mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
10 lines
196 B
Rust
10 lines
196 B
Rust
//@ revisions: cfail1 cfail2 cfail3
|
|
//@ compile-flags: -Coverflow-checks=on
|
|
//@ build-pass
|
|
|
|
#![warn(arithmetic_overflow)]
|
|
|
|
fn main() {
|
|
let _ = 255u8 + 1; //~ WARNING operation will overflow
|
|
}
|