about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-11-16 16:22:48 -0500
committerSteve Klabnik <steve@steveklabnik.com>2015-11-16 16:22:48 -0500
commit4c12530575083794bd6fa339c4bf4559d14432ed (patch)
tree9277f885abb86bc336e81f5dddb4b6b88d45699f
parentf0b719d41e55e9543d81336bbe83d57f1fee2d04 (diff)
parent0b510641d3a4c4db54fed5b49fe923b1482c8ab4 (diff)
downloadrust-4c12530575083794bd6fa339c4bf4559d14432ed.tar.gz
rust-4c12530575083794bd6fa339c4bf4559d14432ed.zip
Rollup merge of #29796 - barosl:unresolved-import-extern-crate, r=steveklabnik
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 a6665a13786..f35b554d6cf 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##"