1
Fork 0

recover from for-else and while-else

This commit is contained in:
y21 2023-02-23 20:12:01 +01:00
parent 64165aac68
commit 0758c05c97
20 changed files with 218 additions and 22 deletions

View file

@ -0,0 +1,8 @@
fn main() {
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
};
}