summaryrefslogtreecommitdiffstats
path: root/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs
new file mode 100644
index 000000000..88d602e4b
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs
@@ -0,0 +1,8 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-mod-assign-by-zero.rs
+
+fn main() {
+ let mut a = 1;
+ a %= &0;
+}