rust/tests/ui/loops/loop-else-err.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
287 B
Rust
Raw Normal View History

2023-02-23 19:12:01 +00:00
fn main() {
loop {
//~^ NOTE `else` is attached to this loop
} else {
//~^ ERROR `loop...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
}
}