2022-07-24 13:28:45 -05:00
|
|
|
#![feature(unchecked_math)]
|
|
|
|
|
2019-06-16 04:10:14 -05:00
|
|
|
fn main() {
|
|
|
|
// MAX overflow
|
2022-07-24 13:28:45 -05:00
|
|
|
let _val = unsafe { 40000u16.unchecked_add(30000) }; //~ ERROR: overflow executing `unchecked_add`
|
2019-06-16 04:10:14 -05:00
|
|
|
}
|