]> git.lizzy.rs Git - rust.git/blob - src/test/ui/numbers-arithmetic/overflowing-sub.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / numbers-arithmetic / overflowing-sub.rs
1 // run-fail
2 // error-pattern:thread 'main' panicked at 'attempt to subtract with overflow'
3 // ignore-emscripten no processes
4 // compile-flags: -C debug-assertions
5
6 #![allow(arithmetic_overflow)]
7
8 fn main() {
9     let _x = 42u8 - (42u8 + 1);
10 }