Files
rust/tests/ui/numbers-arithmetic/overflowing-add.rs

12 lines
253 B
Rust
Raw Normal View History

//@ run-fail
//@ regex-error-pattern: thread 'main'.*panicked
//@ error-pattern: attempt to add with overflow
//@ compile-flags: -C debug-assertions
//@ needs-subprocess
2020-02-18 22:49:47 +01:00
#![allow(arithmetic_overflow)]
fn main() {
let _x = 200u8 + 200u8 + 200u8;
}