about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarosl Lee <vcs@barosl.com>2015-11-12 18:05:45 +0900
committerBarosl Lee <vcs@barosl.com>2015-11-12 18:11:55 +0900
commit0b510641d3a4c4db54fed5b49fe923b1482c8ab4 (patch)
tree9296fb6ddbd4a5aa2bd296cc64f92ca242753372
parent3bd622f94cfd0c6904dfac5390fc48c488e3aca2 (diff)
downloadrust-0b510641d3a4c4db54fed5b49fe923b1482c8ab4.tar.gz
rust-0b510641d3a4c4db54fed5b49fe923b1482c8ab4.zip
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.
-rw-r--r--src/librustc_resolve/diagnostics.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs
index 4147f2bea48..6ce70ecdd55 100644
--- a/src/librustc_resolve/diagnostics.rs
+++ b/src/librustc_resolve/diagnostics.rs
@@ -806,6 +806,15 @@ mod something {
     pub struct Foo;
 }
 ```
+
+Or, if you tried to use a module from an external crate, you may have missed
+the `extern crate` declaration:
+
+```
+extern crate homura; // Required to use the `homura` crate
+
+use homura::Madoka;
+```
 "##,
 
 E0433: r##"