]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/unchecked_div1.rs
53d80007646def893cd99ea61be66025c3ac9424
[rust.git] / tests / compile-fail / unchecked_div1.rs
1 #![feature(core_intrinsics)]
2 fn main() {
3     // MIN/-1 cannot be represented
4     unsafe { std::intrinsics::unchecked_div(i16::MIN, -1); } //~ ERROR overflow executing `unchecked_div`
5 }