rust/tests/compile-fail/intrinsics/exact_div1.rs

6 lines
138 B
Rust
Raw Normal View History

2019-06-16 03:51:08 -05:00
#![feature(core_intrinsics)]
fn main() {
// divison by 0
unsafe { std::intrinsics::exact_div(2, 0); } //~ ERROR divisor of zero
}