diff options
Diffstat (limited to 'tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs')
| -rw-r--r-- | tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs new file mode 100644 index 00000000000..5b92ada2e0b --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs @@ -0,0 +1,8 @@ +// run-fail +// ignore-wasm32 +// error-pattern:location-sub-assign-overflow.rs + +fn main() { + let mut a: u8 = 0; + a -= &1; +}  | 
