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:
parent
9a2e53a7b3
commit
a4ce2011cb
2 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue