Skip to content

Commit 0b51064

Browse files
committed
Improve the detailed error message for E0432
The command-line error message for E0432 does mention the possibility of missing the `extern crate` declaration, but the detailed error message for it doesn't. Fixes #29517.
1 parent 3bd622f commit 0b51064

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/librustc_resolve/diagnostics.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,15 @@ mod something {
806806
pub struct Foo;
807807
}
808808
```
809+
810+
Or, if you tried to use a module from an external crate, you may have missed
811+
the `extern crate` declaration:
812+
813+
```
814+
extern crate homura; // Required to use the `homura` crate
815+
816+
use homura::Madoka;
817+
```
809818
"##,
810819

811820
E0433: r##"

0 commit comments

Comments
 (0)