Skip to content

Commit

Permalink
Rollup merge of #72235 - GuillaumeGomez:cleanup-E0590, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Clean up E0590 explanation

r? @Dylan-DPC
  • Loading branch information
RalfJung authored May 22, 2020
2 parents 53d0046 + 985ebf2 commit 02eb002
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 02eb002

Please sign in to comment.