mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Clean up E0590 explanation
This commit is contained in:
parent
97f3eeec82
commit
985ebf2c4a
@ -1,13 +1,17 @@
|
||||
`break` or `continue` must include a label when used in the condition of a
|
||||
`while` loop.
|
||||
`break` or `continue` keywords were used in a condition of a `while` loop
|
||||
without a label.
|
||||
|
||||
Example of erroneous code:
|
||||
Erroneous code code:
|
||||
|
||||
```compile_fail,E0590
|
||||
while break {}
|
||||
```
|
||||
|
||||
`break` or `continue` must include a label when used in the condition of a
|
||||
`while` loop.
|
||||
|
||||
To fix this, add a label specifying which loop is being broken out of:
|
||||
|
||||
```
|
||||
'foo: while break 'foo {}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user