2020-02-18 15:49:47 -06:00
|
|
|
#![allow(arithmetic_overflow)]
|
2018-05-17 05:07:00 -05:00
|
|
|
|
2020-04-16 01:50:32 -05:00
|
|
|
// run-fail
|
2018-05-17 05:07:00 -05:00
|
|
|
// error-pattern: overflow
|
2018-05-18 03:59:44 -05:00
|
|
|
// compile-flags: -C overflow-checks=yes
|
2022-06-15 08:36:19 -05:00
|
|
|
// for some reason, fails to match error string on
|
|
|
|
// wasm32-unknown-unknown with stripped debuginfo and symbols,
|
|
|
|
// so don't strip it
|
|
|
|
// compile-flags:-Cstrip=none
|
2018-05-17 05:07:00 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x: &'static u32 = &(0u32 - 1);
|
|
|
|
}
|