]> git.lizzy.rs Git - rust.git/blob - src/test/ui/numbers-arithmetic/overflowing-add.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / ui / numbers-arithmetic / overflowing-add.rs
1 // run-fail
2 // error-pattern:thread 'main' panicked at 'attempt to add with overflow'
3 // compile-flags: -C debug-assertions
4 // ignore-emscripten no processes
5
6 #![allow(arithmetic_overflow)]
7
8 fn main() {
9     let _x = 200u8 + 200u8 + 200u8;
10 }