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

8 lines
114 B
Rust

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