about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2020-07-04 19:30:45 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2020-07-04 19:30:45 +0200
commitee8dd4e3cce3bf158a31e50205ee3ebd76c40370 (patch)
treecf7a030e3a7788e9f98604b0fd12df2e33831076 /src/test
parent0cd7ff7ddfb75a38dca81ad3e76b1e984129e939 (diff)
Fix const prop ICE
we used to erase the local just before we tried to read it for diagnostics
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/const_prop/ice-assert-fail-div-by-zero.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/const_prop/ice-assert-fail-div-by-zero.rs b/src/test/ui/const_prop/ice-assert-fail-div-by-zero.rs
new file mode 100644
index 00000000000..5f2d5e80243
--- /dev/null
+++ b/src/test/ui/const_prop/ice-assert-fail-div-by-zero.rs
@@ -0,0 +1,9 @@
+// check-pass
+
+pub struct Fixed64(i64);
+
+pub fn div(f: Fixed64) {
+    f.0 / 0;
+}
+
+fn main() {}