From 9e1ea5e5ee6369128e2a3005bb78edc059fa9195 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 24 Jul 2015 12:30:14 +0200 Subject: [PATCH] Add E0432 error explanation --- src/librustc_resolve/diagnostics.rs | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs index a737a5ebe65d..5bce8722c944 100644 --- a/src/librustc_resolve/diagnostics.rs +++ b/src/librustc_resolve/diagnostics.rs @@ -484,7 +484,11 @@ use something::{self, self}; // error: `self` import can only appear once in ``` Please verify you didn't misspell the import name or remove the duplicated -`self` import. +`self` import. Example: + +``` +use something::self; // ok! +``` "##, E0431: r##" @@ -499,6 +503,25 @@ You can't import the current module in itself, please remove this import or verify you didn't misspell it. "##, +E0432: r##" +An import was unresolved. Erroneous code example: + +``` +use something::Foo; // error: unresolved import `something::Foo`. +``` + +Please verify you didn't misspell the import name or the import does exist +in the module from where you tried to import it. Example: + +``` +use something::Foo; // ok! + +mod something { + pub struct Foo; +} +``` +"##, + E0433: r##" Invalid import. Example of erroneous code: @@ -543,7 +566,6 @@ register_diagnostics! { E0426, // use of undeclared label E0427, // cannot use `ref` binding mode with ... E0429, // `self` imports are only allowed within a { } list - E0432, // unresolved import E0434, // can't capture dynamic environment in a fn item E0435, // attempt to use a non-constant value in a constant E0437, // type is not a member of trait