Skip to content

Commit 40d7164

Browse files
committed
Correct examples in E0590 documentation
1 parent 4cefee0 commit 40d7164

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/librustc_passes/diagnostics.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,16 @@ E0590: r##"
218218
Example of erroneous code:
219219
220220
```compile_fail
221-
while break {}
221+
loop {
222+
while break {}
223+
}
222224
```
223225
224226
To fix this, add a label specifying which loop is being broken out of:
225227
```
226-
'foo: while break 'foo {}
228+
'foo: loop {
229+
while break 'foo {}
230+
}
227231
```
228232
"##,
229233

0 commit comments

Comments
 (0)