rust/tests/ui/numbers-arithmetic/promoted_overflow.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
331 B
Rust
Raw Normal View History

2020-02-18 15:49:47 -06:00
#![allow(arithmetic_overflow)]
2020-04-16 01:50:32 -05:00
// run-fail
// error-pattern: overflow
2018-05-18 03:59:44 -05:00
// compile-flags: -C overflow-checks=yes
// 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
fn main() {
let x: &'static u32 = &(0u32 - 1);
}