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