rust/tests/fail/intrinsics/exact_div2.rs

6 lines
188 B
Rust
Raw Normal View History

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