rust/tests/fail/intrinsics/exact_div1.rs

6 lines
138 B
Rust

#![feature(core_intrinsics)]
fn main() {
// divison by 0
unsafe { std::intrinsics::exact_div(2, 0) }; //~ ERROR divisor of zero
}