rust/tests/incremental/warnings-reemitted.rs

10 lines
193 B
Rust
Raw Normal View History

// revisions: cfail1 cfail2 cfail3
// compile-flags: -Coverflow-checks=on
// build-pass
2020-02-18 15:49:47 -06:00
#![warn(arithmetic_overflow)]
fn main() {
2020-02-15 16:02:58 -06:00
let _ = 255u8 + 1; //~ WARNING operation will overflow
}