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