about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2015-07-24 14:58:00 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2015-07-24 14:58:00 +0200
commit40617b60cbbf78bb20ba662b192957b58d07dbba (patch)
treef097a20b180072ceff7f584c096c99f09c300ad6
parentc8b9e8363a15c0476040869d2e6749018ae4a6b3 (diff)
downloadrust-40617b60cbbf78bb20ba662b192957b58d07dbba.tar.gz
rust-40617b60cbbf78bb20ba662b192957b58d07dbba.zip
Add E0425 error explanation
-rw-r--r--src/librustc_resolve/diagnostics.rs24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs
index 6753507b90d..22bfda2ba87 100644
--- a/src/librustc_resolve/diagnostics.rs
+++ b/src/librustc_resolve/diagnostics.rs
@@ -457,6 +457,29 @@ impl Foo {
 ```
 "##,
 
+E0425: r##"
+An unresolved name was used. Example of erroneous code:
+
+```
+something_that_doesnt_exist::foo; // error: unresolved name `f::foo`
+```
+
+Please verify you didn't misspell the name or that you're not using an
+invalid object. Example:
+
+```
+enum something_that_does_exist {
+    foo
+}
+// or:
+mod something_that_does_exist {
+    pub static foo : i32 = 0i32;
+}
+
+something_that_does_exist::foo; // ok!
+```
+"##,
+
 E0426: r##"
 An undeclared label was used. Example of erroneous code:
 
@@ -581,7 +604,6 @@ register_diagnostics! {
     E0422, // does not name a structure
     E0423, // is a struct variant name, but this expression uses it like a
            // function name
-    E0425, // unresolved name
     E0427, // cannot use `ref` binding mode with ...
     E0429, // `self` imports are only allowed within a { } list
     E0434, // can't capture dynamic environment in a fn item