rust/tests/compile-fail/exact_div2.rs

6 lines
180 B
Rust
Raw Normal View History

2019-06-16 10:51:08 +02:00
#![feature(core_intrinsics)]
fn main() {
// divison with a remainder
2019-11-03 10:15:55 +01:00
unsafe { std::intrinsics::exact_div(2u16, 3); } //~ ERROR 2 cannot be divided by 3 without remainder
2019-06-16 10:51:08 +02:00
}