about summary refs log tree commit diff
path: root/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs
blob: 8014bae2889c4032b525b16296c1d432a0bd5532 (plain)
1
2
3
4
5
6
7
//@ run-fail
//@ error-pattern:location-add-assign-overflow.rs

fn main() {
    let mut a: u8 = 255;
    a += &1;
}