rust/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs

8 lines
116 B
Rust
Raw Permalink Normal View History

//@ run-fail
//@ error-pattern:location-add-assign-overflow.rs
2023-11-23 10:54:06 -06:00
fn main() {
let mut a: u8 = 255;
a += &1;
}