mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 13:05:18 +03:00
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`.
This commit is contained in:
@@ -9,6 +9,7 @@ const fn f(x: usize) -> usize {
|
||||
//~| ERROR E0017
|
||||
//~| ERROR E0080
|
||||
//~| ERROR E0744
|
||||
//~| ERROR E0019
|
||||
sum += i;
|
||||
}
|
||||
sum
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user