Skip to content

Commit

Permalink
Clean up E0590 explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 22, 2020
1 parent 97f3eee commit 985ebf2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/librustc_error_codes/error_codes/E0590.md
Original file line number Diff line number Diff line change
@@ -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 {}
```

0 comments on commit 985ebf2

Please sign in to comment.