rust/tests/fail/intrinsics/unchecked_sub1.rs

8 lines
178 B
Rust
Raw Normal View History

#![feature(core_intrinsics)]
fn main() {
// MIN overflow
unsafe {
2022-06-21 13:40:02 -05:00
std::intrinsics::unchecked_sub(14u32, 22); //~ ERROR overflow executing `unchecked_sub`
}
}