rust/tests/compile-fail/exact_div3.rs

6 lines
194 B
Rust
Raw Normal View History

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