diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/while/while-else-err.stderr | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/while/while-else-err.stderr b/tests/ui/while/while-else-err.stderr new file mode 100644 index 000000000..88f715d56 --- /dev/null +++ b/tests/ui/while/while-else-err.stderr @@ -0,0 +1,17 @@ +error: `while...else` loops are not supported + --> $DIR/while-else-err.rs:4:7 + | +LL | while false { + | ----- `else` is attached to this loop +LL | +LL | } else { + | _______^ +LL | | +LL | | +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 + |