7 lines
166 B
Rust
7 lines
166 B
Rust
#![feature(unchecked_math)]
|
|
|
|
fn main() {
|
|
// MAX overflow
|
|
let _val = unsafe { 40000u16.unchecked_add(30000) }; //~ ERROR: overflow executing `unchecked_add`
|
|
}
|