summaryrefslogtreecommitdiffstats
path: root/tests/ui/numbers-arithmetic/location-add-overflow.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/numbers-arithmetic/location-add-overflow.rs')
-rw-r--r--tests/ui/numbers-arithmetic/location-add-overflow.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/location-add-overflow.rs b/tests/ui/numbers-arithmetic/location-add-overflow.rs
new file mode 100644
index 000000000..085623c9b
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-add-overflow.rs
@@ -0,0 +1,7 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-add-overflow.rs
+
+fn main() {
+ let _: u8 = 255 + &1;
+}