about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/middle/resolve.rs3
-rw-r--r--src/test/compile-fail/alt-join.rs2
-rw-r--r--src/test/compile-fail/bad-expr-path.rs2
-rw-r--r--src/test/compile-fail/bad-expr-path2.rs2
-rw-r--r--src/test/compile-fail/does-nothing.rs2
-rw-r--r--src/test/compile-fail/issue-1476.rs2
-rw-r--r--src/test/compile-fail/issue-3021-b.rs2
-rw-r--r--src/test/compile-fail/issue-3021-d.rs4
-rw-r--r--src/test/compile-fail/issue-3021.rs2
9 files changed, 11 insertions, 10 deletions
diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs
index 3f1e4dca3a1..e75a73650b4 100644
--- a/src/librustc/middle/resolve.rs
+++ b/src/librustc/middle/resolve.rs
@@ -4842,7 +4842,8 @@ pub impl Resolver {
 
         if vec::len(values) > 0 &&
             values[smallest] != uint::max_value &&
-            values[smallest] < str::len(name) + 2 {
+            values[smallest] < str::len(name) + 2 &&
+            maybes[smallest] != name.to_owned() {
 
             Some(vec::swap_remove(&mut maybes, smallest))
 
diff --git a/src/test/compile-fail/alt-join.rs b/src/test/compile-fail/alt-join.rs
index a94709c5774..94488fbb552 100644
--- a/src/test/compile-fail/alt-join.rs
+++ b/src/test/compile-fail/alt-join.rs
@@ -16,6 +16,6 @@ fn my_fail() -> ! { fail!(); }
 fn main() {
     match true { false => { my_fail(); } true => { } }
 
-    log(debug, x); //~ ERROR unresolved name: x
+    log(debug, x); //~ ERROR unresolved name: `x`.
     let x: int;
 }
diff --git a/src/test/compile-fail/bad-expr-path.rs b/src/test/compile-fail/bad-expr-path.rs
index 576f9ef677e..30014817308 100644
--- a/src/test/compile-fail/bad-expr-path.rs
+++ b/src/test/compile-fail/bad-expr-path.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: unresolved name: m1::a
+// error-pattern: unresolved name: `m1::a`. Did you mean: `args`?
 
 mod m1 {}
 
diff --git a/src/test/compile-fail/bad-expr-path2.rs b/src/test/compile-fail/bad-expr-path2.rs
index 5545bbf68f0..88239a4cc3f 100644
--- a/src/test/compile-fail/bad-expr-path2.rs
+++ b/src/test/compile-fail/bad-expr-path2.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: unresolved name: m1::a
+// error-pattern: unresolved name: `m1::a`. Did you mean: `args`?
 
 mod m1 {
     pub mod a {}
diff --git a/src/test/compile-fail/does-nothing.rs b/src/test/compile-fail/does-nothing.rs
index c6115f40853..a360d657957 100644
--- a/src/test/compile-fail/does-nothing.rs
+++ b/src/test/compile-fail/does-nothing.rs
@@ -1,3 +1,3 @@
-// error-pattern: unresolved name: this_does_nothing_what_the
+// error-pattern: unresolved name: `this_does_nothing_what_the`.
 fn main() { debug!("doing"); this_does_nothing_what_the; debug!("boing"); }
 
diff --git a/src/test/compile-fail/issue-1476.rs b/src/test/compile-fail/issue-1476.rs
index 4f21e30cc16..7a45ecc83b0 100644
--- a/src/test/compile-fail/issue-1476.rs
+++ b/src/test/compile-fail/issue-1476.rs
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    log(error, x); //~ ERROR unresolved name: x
+    log(error, x); //~ ERROR unresolved name: `x`.
 }
diff --git a/src/test/compile-fail/issue-3021-b.rs b/src/test/compile-fail/issue-3021-b.rs
index a782dd58ee6..1d4cd69c54e 100644
--- a/src/test/compile-fail/issue-3021-b.rs
+++ b/src/test/compile-fail/issue-3021-b.rs
@@ -19,7 +19,7 @@ fn siphash(k0 : u64) {
     impl siphash {
         fn reset(&mut self) {
            self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR attempted dynamic environment-capture
-           //~^ ERROR unresolved name: k0
+           //~^ ERROR unresolved name: `k0`.
         }
     }
 }
diff --git a/src/test/compile-fail/issue-3021-d.rs b/src/test/compile-fail/issue-3021-d.rs
index 38bd007f189..7381d36a223 100644
--- a/src/test/compile-fail/issue-3021-d.rs
+++ b/src/test/compile-fail/issue-3021-d.rs
@@ -31,9 +31,9 @@ fn siphash(k0 : u64, k1 : u64) -> siphash {
    impl siphash for sipstate {
         fn reset() {
             self.v0 = k0 ^ 0x736f6d6570736575;  //~ ERROR attempted dynamic environment-capture
-            //~^ ERROR unresolved name: k0
+            //~^ ERROR unresolved name: `k0`.
             self.v1 = k1 ^ 0x646f72616e646f6d;   //~ ERROR attempted dynamic environment-capture
-            //~^ ERROR unresolved name: k1
+            //~^ ERROR unresolved name: `k1`.
         }
         fn result() -> u64 { return mk_result(self); }
     }
diff --git a/src/test/compile-fail/issue-3021.rs b/src/test/compile-fail/issue-3021.rs
index fdfd2562175..e5a7a7990e5 100644
--- a/src/test/compile-fail/issue-3021.rs
+++ b/src/test/compile-fail/issue-3021.rs
@@ -23,7 +23,7 @@ fn siphash(k0 : u64) -> siphash {
    impl siphash for sipstate {
         fn reset() {
            self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR attempted dynamic environment-capture
-           //~^ ERROR unresolved name: k0
+           //~^ ERROR unresolved name: `k0`.
         }
     }
     fail!();