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 21:49:47 +00:00
#![allow(arithmetic_overflow)]
2020-04-16 06:50:32 +00:00
// run-fail
// error-pattern: overflow
2018-05-18 08:59:44 +00: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);
}