rust/tests/ui/numbers-arithmetic/location-add-assign-overflo...

8 lines
116 B
Rust

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