From: Dylan MacKenzie Date: Wed, 13 Nov 2019 22:48:59 +0000 (-0800) Subject: A `Downcast` is now reached when const-checking a `for` loop X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=a4ce2011cb0191e3be3dde2bca27b5c1ea4aadf2;p=rust.git 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`. --- 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 }