Skip to content

Commit

Permalink
Add E0431 error explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 24, 2015
1 parent 18f4e8c commit 2537abf
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/librustc_resolve/diagnostics.rs
Expand Up @@ -476,7 +476,7 @@ struct Bar2; // ok!
"##,

E0430: r##"
The `self` import appears more than once in the list.
The `self` import appears more than once in the list. Erroneous code example:
```
use something::{self, self}; // error: `self` import can only appear once in
Expand All @@ -487,6 +487,18 @@ Please verify you didn't misspell the import name or remove the duplicated
`self` import.
"##,

E0431: r##"
`self` import was made. Erroneous code example:
```
use {self}; // error: `self` import can only appear in an import list with a
// non-empty prefix
```
You can't import the current module in itself, please remove this import or
verify you didn't misspell it.
"##,

E0433: r##"
Invalid import. Example of erroneous code:
Expand Down Expand Up @@ -531,8 +543,6 @@ register_diagnostics! {
E0426, // use of undeclared label
E0427, // cannot use `ref` binding mode with ...
E0429, // `self` imports are only allowed within a { } list
E0431, // `self` import can only appear in an import list with a non-empty
// prefix
E0432, // unresolved import
E0434, // can't capture dynamic environment in a fn item
E0435, // attempt to use a non-constant value in a constant
Expand Down

0 comments on commit 2537abf

Please sign in to comment.