From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/numbers-arithmetic/location-add-assign-overflow.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/ui/numbers-arithmetic/location-add-assign-overflow.rs (limited to 'tests/ui/numbers-arithmetic/location-add-assign-overflow.rs') 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; +} -- cgit v1.2.3