about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-08-11 22:11:30 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-08-11 22:42:19 -0700
commit726c9f2c807c98e2ad5bdca356d76b86195d738f (patch)
tree9e1284d74e97b84c1d6733120a388f43d2a7a550
parente837258bbdac3d00eebbb4484733a1be7f025529 (diff)
parentf1e613eeb10aea231911b5da1c01eca2805f0f49 (diff)
downloadrust-726c9f2c807c98e2ad5bdca356d76b86195d738f.tar.gz
rust-726c9f2c807c98e2ad5bdca356d76b86195d738f.zip
rollup merge of #27635: GuillaumeGomez/patch-4
r? @Manishearth
-rw-r--r--src/librustc_resolve/diagnostics.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs
index 1618568882e..04144a50b67 100644
--- a/src/librustc_resolve/diagnostics.rs
+++ b/src/librustc_resolve/diagnostics.rs
@@ -627,21 +627,29 @@ trait Foo {
         Self; // error: unresolved name `Self`
     }
 }
+
+// or:
+let x = unknown_variable;  // error: unresolved name `unknown_variable`
 ```
 
-Please verify you didn't misspell the name or that you're not using an
-invalid object. Example:
+Please verify that the name wasn't misspelled and ensure that the
+identifier being referred to is valid for the given situation. Example:
 
 ```
 enum something_that_does_exist {
     foo
 }
+
 // or:
 mod something_that_does_exist {
     pub static foo : i32 = 0i32;
 }
 
 something_that_does_exist::foo; // ok!
+
+// or:
+let unknown_variable = 12u32;
+let x = unknown_variable; // ok!
 ```
 "##,