about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2019-11-13 14:48:59 -0800
committerDylan MacKenzie <ecstaticmorse@gmail.com>2019-11-15 10:33:52 -0800
commita4ce2011cb0191e3be3dde2bca27b5c1ea4aadf2 (patch)
treefd159b46ff812dcd80f90df0d6b4888d22af2bb0 /src
parent9a2e53a7b385c3fbb0621a5a34e702f81a12342a (diff)
downloadrust-a4ce2011cb0191e3be3dde2bca27b5c1ea4aadf2.tar.gz
rust-a4ce2011cb0191e3be3dde2bca27b5c1ea4aadf2.zip
A `Downcast` is now reached when const-checking a `for` loop
I believe this occurs because the old checker stopped processing basic
blocks after a `SwitchInt`.
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/consts/const-fn-error.rs1
-rw-r--r--src/test/compile-fail/issue-52443.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/test/compile-fail/consts/const-fn-error.rs b/src/test/compile-fail/consts/const-fn-error.rs
index 4adad16a570..1a4fc72e817 100644
--- a/src/test/compile-fail/consts/const-fn-error.rs
+++ b/src/test/compile-fail/consts/const-fn-error.rs
@@ -9,6 +9,7 @@ const fn f(x: usize) -> usize {
         //~| ERROR E0017
         //~| ERROR E0080
         //~| ERROR E0744
+        //~| ERROR E0019
         sum += i;
     }
     sum
diff --git a/src/test/compile-fail/issue-52443.rs b/src/test/compile-fail/issue-52443.rs
index 04eecb5687f..ee37aaa5e13 100644
--- a/src/test/compile-fail/issue-52443.rs
+++ b/src/test/compile-fail/issue-52443.rs
@@ -11,4 +11,5 @@ fn main() {
     //~| ERROR `for` is not allowed in a `const`
     //~| ERROR references in constants may only refer to immutable values
     //~| ERROR evaluation of constant value failed
+    //~| ERROR constant contains unimplemented expression type
 }