From 0b510641d3a4c4db54fed5b49fe923b1482c8ab4 Mon Sep 17 00:00:00 2001 From: Barosl Lee Date: Thu, 12 Nov 2015 18:05:45 +0900 Subject: [PATCH] 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. --- src/librustc_resolve/diagnostics.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs index 4147f2bea4850..6ce70ecdd5522 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##"