Skip to content

Commit 985ebf2

Browse files
Clean up E0590 explanation
1 parent 97f3eee commit 985ebf2

File tree

1 file changed

+7
-3
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+7
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
`break` or `continue` must include a label when used in the condition of a
2-
`while` loop.
1+
`break` or `continue` keywords were used in a condition of a `while` loop
2+
without a label.
33

4-
Example of erroneous code:
4+
Erroneous code code:
55

66
```compile_fail,E0590
77
while break {}
88
```
99

10+
`break` or `continue` must include a label when used in the condition of a
11+
`while` loop.
12+
1013
To fix this, add a label specifying which loop is being broken out of:
14+
1115
```
1216
'foo: while break 'foo {}
1317
```

0 commit comments

Comments
 (0)