rust/tests/fail/intrinsics/unchecked_sub2.rs
2022-06-01 10:53:38 -04:00

6 lines
172 B
Rust

#![feature(core_intrinsics)]
fn main() {
// MAX overflow
unsafe { std::intrinsics::unchecked_sub(30000i16, -7000); } //~ ERROR overflow executing `unchecked_sub`
}