Clean up E0264, E0267 and E0268 explanations

This commit is contained in:
Guillaume Gomez 2020-02-04 22:03:54 +01:00
parent 320ada6479
commit 11eee614f0
3 changed files with 11 additions and 6 deletions

View File

@ -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)]

View File

@ -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

View File

@ -1,6 +1,6 @@
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() {
@ -8,6 +8,7 @@ fn some_func() {
}
```
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:
```