rust/tests/compile-fail/exact_div3.rs
2019-12-03 17:37:42 +01:00

6 lines
190 B
Rust

#![feature(core_intrinsics)]
fn main() {
// signed divison with a remainder
unsafe { std::intrinsics::exact_div(-19i8, 2); } //~ ERROR -19 cannot be divided by 2 without remainder
}