Skip to content

Commit 02eb002

Browse files
authored
Rollup merge of #72235 - GuillaumeGomez:cleanup-E0590, r=Dylan-DPC
Clean up E0590 explanation r? @Dylan-DPC
2 parents 53d0046 + 985ebf2 commit 02eb002

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)