about summary refs log tree commit diff
path: root/tests/ui/numbers-arithmetic/overflowing-add.rs
blob: a63fc3bccf1dc28239705b84d4170ac4e4731a59 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ run-fail
//@ regex-error-pattern: thread 'main'.*panicked
//@ error-pattern: attempt to add with overflow
//@ compile-flags: -C debug-assertions
//@ needs-subprocess

#![allow(arithmetic_overflow)]

fn main() {
    let _x = 200u8 + 200u8 + 200u8;
}