rust/tests/ui/loops/loop-else-break-with-value....

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

19 lines
466 B
Plaintext
Raw Normal View History

2023-02-24 03:12:01 +08:00
error: `loop...else` loops are not supported
--> $DIR/loop-else-break-with-value.rs:5:7
|
LL | let Some(1) = loop {
| ---- `else` is attached to this loop
...
LL | } else {
| _______^
LL | |
LL | |
LL | | return;
LL | | };
| |_____^
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
error: aborting due to previous error