Skip to content

Commit 5bcd27c

Browse files
authored
Rollup merge of rust-lang#68832 - GuillaumeGomez:clean-up-3-err-codes, r=estebank
Clean up E0264, E0267 and E0268 explanations r? @Dylan-DPC
2 parents eac6e90 + 11eee61 commit 5bcd27c

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/librustc_error_codes/error_codes/E0264.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
An unknown external lang item was used. Erroneous code example:
1+
An unknown external lang item was used.
2+
3+
Erroneous code example:
24

35
```compile_fail,E0264
46
#![feature(lang_items)]

src/librustc_error_codes/error_codes/E0267.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
This error indicates the use of a loop keyword (`break` or `continue`) inside a
2-
closure but outside of any loop. Erroneous code example:
1+
A loop keyword (`break` or `continue`) was used inside a closure but outside of
2+
any loop.
3+
4+
Erroneous code example:
35

46
```compile_fail,E0267
57
let w = || { break; }; // error: `break` inside of a closure

src/librustc_error_codes/error_codes/E0268.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
This error indicates the use of a loop keyword (`break` or `continue`) outside
2-
of a loop. Without a loop to break out of or continue in, no sensible action can
3-
be taken. Erroneous code example:
1+
A loop keyword (`break` or `continue`) was used outside of a loop.
2+
3+
Erroneous code example:
44

55
```compile_fail,E0268
66
fn some_func() {
77
break; // error: `break` outside of a loop
88
}
99
```
1010

11+
Without a loop to break out of or continue in, no sensible action can be taken.
1112
Please verify that you are using `break` and `continue` only in loops. Example:
1213

1314
```

0 commit comments

Comments
 (0)