Skip to content

Commit

Permalink
sort error codes in librustc_passes
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 4, 2019
1 parent 42ec683 commit 4b49e90
Showing 1 changed file with 28 additions and 29 deletions.
57 changes: 28 additions & 29 deletions src/librustc_passes/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,23 +198,6 @@ impl Foo for Bar {
```
"##,


E0590: r##"
`break` or `continue` must include a label when used in the condition of a
`while` loop.
Example of erroneous code:
```compile_fail
while break {}
```
To fix this, add a label specifying which loop is being broken out of:
```
'foo: while break 'foo {}
```
"##,

E0571: r##"
A `break` statement with an argument appeared in a non-`loop` loop.
Expand Down Expand Up @@ -249,6 +232,22 @@ let result = loop { // ok!
```
"##,

E0590: r##"
`break` or `continue` must include a label when used in the condition of a
`while` loop.
Example of erroneous code:
```compile_fail
while break {}
```
To fix this, add a label specifying which loop is being broken out of:
```
'foo: while break 'foo {}
```
"##,

E0642: r##"
Trait methods currently cannot take patterns as arguments.
Expand All @@ -270,6 +269,18 @@ trait Foo {
```
"##,

E0670: r##"
Rust 2015 does not permit the use of `async fn`.
Example of erroneous code:
```compile_fail,E0670
async fn foo() {}
```
Switch to the Rust 2018 edition to use `async fn`.
"##,

E0695: r##"
A `break` statement without a label appeared inside a labeled block.
Expand Down Expand Up @@ -307,18 +318,6 @@ loop {
}
```
"##,

E0670: r##"
Rust 2015 does not permit the use of `async fn`.
Example of erroneous code:
```compile_fail,E0670
async fn foo() {}
```
Switch to the Rust 2018 edition to use `async fn`.
"##,
;
E0226, // only a single explicit lifetime bound is permitted
E0472, // asm! is unsupported on this target
Expand Down

0 comments on commit 4b49e90

Please sign in to comment.