rust/tests/compile-fail/exact_div3.rs

6 lines
190 B
Rust
Raw Normal View History

2019-06-16 03:51:08 -05:00
#![feature(core_intrinsics)]
fn main() {
// signed divison with a remainder
2019-12-03 10:37:42 -06:00
unsafe { std::intrinsics::exact_div(-19i8, 2); } //~ ERROR -19 cannot be divided by 2 without remainder
2019-06-16 03:51:08 -05:00
}