recover from for-else and while-else
This commit is contained in:
parent
64165aac68
commit
0758c05c97
20 changed files with 218 additions and 22 deletions
8
tests/ui/while/while-else-let-else-err.rs
Normal file
8
tests/ui/while/while-else-let-else-err.rs
Normal file
|
@ -0,0 +1,8 @@
|
|||
fn main() {
|
||||
let _ = while false {
|
||||
//~^ NOTE `else` is attached to this loop
|
||||
} else {
|
||||
//~^ ERROR `while...else` loops are not supported
|
||||
//~| NOTE consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue