Skip to content

Commit c114997

Browse files
---
yaml --- r: 235885 b: refs/heads/stable c: 9e1ea5e h: refs/heads/master i: 235883: ed196e6 v: v3
1 parent c7a49c9 commit c114997

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 2537abf503e1ac44a3b97fab6190ac4dff01a8ff
32+
refs/heads/stable: 9e1ea5e5ee6369128e2a3005bb78edc059fa9195
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc_resolve/diagnostics.rs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,11 @@ use something::{self, self}; // error: `self` import can only appear once in
484484
```
485485
486486
Please verify you didn't misspell the import name or remove the duplicated
487-
`self` import.
487+
`self` import. Example:
488+
489+
```
490+
use something::self; // ok!
491+
```
488492
"##,
489493

490494
E0431: r##"
@@ -499,6 +503,25 @@ You can't import the current module in itself, please remove this import or
499503
verify you didn't misspell it.
500504
"##,
501505

506+
E0432: r##"
507+
An import was unresolved. Erroneous code example:
508+
509+
```
510+
use something::Foo; // error: unresolved import `something::Foo`.
511+
```
512+
513+
Please verify you didn't misspell the import name or the import does exist
514+
in the module from where you tried to import it. Example:
515+
516+
```
517+
use something::Foo; // ok!
518+
519+
mod something {
520+
pub struct Foo;
521+
}
522+
```
523+
"##,
524+
502525
E0433: r##"
503526
Invalid import. Example of erroneous code:
504527
@@ -543,7 +566,6 @@ register_diagnostics! {
543566
E0426, // use of undeclared label
544567
E0427, // cannot use `ref` binding mode with ...
545568
E0429, // `self` imports are only allowed within a { } list
546-
E0432, // unresolved import
547569
E0434, // can't capture dynamic environment in a fn item
548570
E0435, // attempt to use a non-constant value in a constant
549571
E0437, // type is not a member of trait

0 commit comments

Comments
 (0)