Skip to content

Commit

Permalink
Rollup merge of rust-lang#68832 - GuillaumeGomez:clean-up-3-err-codes…
Browse files Browse the repository at this point in the history
…, r=estebank

Clean up E0264, E0267 and E0268 explanations

r? @Dylan-DPC
  • Loading branch information
Centril committed Feb 5, 2020
2 parents a9cc6dc + 11eee61 commit 3b1def8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/librustc_error_codes/error_codes/E0264.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
An unknown external lang item was used. Erroneous code example:
An unknown external lang item was used.

Erroneous code example:

```compile_fail,E0264
#![feature(lang_items)]
Expand Down
6 changes: 4 additions & 2 deletions src/librustc_error_codes/error_codes/E0267.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
This error indicates the use of a loop keyword (`break` or `continue`) inside a
closure but outside of any loop. Erroneous code example:
A loop keyword (`break` or `continue`) was used inside a closure but outside of
any loop.

Erroneous code example:

```compile_fail,E0267
let w = || { break; }; // error: `break` inside of a closure
Expand Down
7 changes: 4 additions & 3 deletions src/librustc_error_codes/error_codes/E0268.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
This error indicates the use of a loop keyword (`break` or `continue`) outside
of a loop. Without a loop to break out of or continue in, no sensible action can
be taken. Erroneous code example:
A loop keyword (`break` or `continue`) was used outside of a loop.

Erroneous code example:

```compile_fail,E0268
fn some_func() {
break; // error: `break` outside of a loop
}
```

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

```
Expand Down

0 comments on commit 3b1def8

Please sign in to comment.