]> git.lizzy.rs Git - rust.git/blob - tests/ui/numbers-arithmetic/promoted_overflow.rs
Rollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper
[rust.git] / tests / ui / numbers-arithmetic / promoted_overflow.rs
1 #![allow(arithmetic_overflow)]
2
3 // run-fail
4 // error-pattern: overflow
5 // compile-flags: -C overflow-checks=yes
6 // for some reason, fails to match error string on
7 // wasm32-unknown-unknown with stripped debuginfo and symbols,
8 // so don't strip it
9 // compile-flags:-Cstrip=none
10
11 fn main() {
12     let x: &'static u32 = &(0u32 - 1);
13 }