rust/tests/fail/intrinsics/exact_div3.rs

8 lines
208 B
Rust
Raw Normal View History

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