Skip to content

Commit a0866d0

Browse files
committed
Adjust error messages for compile-fail tests.
1 parent f460c2a commit a0866d0

File tree

9 files changed

+11
-10
lines changed

9 files changed

+11
-10
lines changed

src/librustc/middle/resolve.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4842,7 +4842,8 @@ pub impl Resolver {
48424842
48434843
if vec::len(values) > 0 &&
48444844
values[smallest] != uint::max_value &&
4845-
values[smallest] < str::len(name) + 2 {
4845+
values[smallest] < str::len(name) + 2 &&
4846+
maybes[smallest] != name.to_owned() {
48464847
48474848
Some(vec::swap_remove(&mut maybes, smallest))
48484849

src/test/compile-fail/alt-join.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ fn my_fail() -> ! { fail!(); }
1616
fn main() {
1717
match true { false => { my_fail(); } true => { } }
1818

19-
log(debug, x); //~ ERROR unresolved name: x
19+
log(debug, x); //~ ERROR unresolved name: `x`.
2020
let x: int;
2121
}

src/test/compile-fail/bad-expr-path.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: unresolved name: m1::a
11+
// error-pattern: unresolved name: `m1::a`. Did you mean: `args`?
1212

1313
mod m1 {}
1414

src/test/compile-fail/bad-expr-path2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: unresolved name: m1::a
11+
// error-pattern: unresolved name: `m1::a`. Did you mean: `args`?
1212

1313
mod m1 {
1414
pub mod a {}

src/test/compile-fail/does-nothing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// error-pattern: unresolved name: this_does_nothing_what_the
1+
// error-pattern: unresolved name: `this_does_nothing_what_the`.
22
fn main() { debug!("doing"); this_does_nothing_what_the; debug!("boing"); }
33

src/test/compile-fail/issue-1476.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// except according to those terms.
1010

1111
fn main() {
12-
log(error, x); //~ ERROR unresolved name: x
12+
log(error, x); //~ ERROR unresolved name: `x`.
1313
}

src/test/compile-fail/issue-3021-b.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn siphash(k0 : u64) {
1919
impl siphash {
2020
fn reset(&mut self) {
2121
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR attempted dynamic environment-capture
22-
//~^ ERROR unresolved name: k0
22+
//~^ ERROR unresolved name: `k0`.
2323
}
2424
}
2525
}

src/test/compile-fail/issue-3021-d.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ fn siphash(k0 : u64, k1 : u64) -> siphash {
3131
impl siphash for sipstate {
3232
fn reset() {
3333
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR attempted dynamic environment-capture
34-
//~^ ERROR unresolved name: k0
34+
//~^ ERROR unresolved name: `k0`.
3535
self.v1 = k1 ^ 0x646f72616e646f6d; //~ ERROR attempted dynamic environment-capture
36-
//~^ ERROR unresolved name: k1
36+
//~^ ERROR unresolved name: `k1`.
3737
}
3838
fn result() -> u64 { return mk_result(self); }
3939
}

src/test/compile-fail/issue-3021.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn siphash(k0 : u64) -> siphash {
2323
impl siphash for sipstate {
2424
fn reset() {
2525
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR attempted dynamic environment-capture
26-
//~^ ERROR unresolved name: k0
26+
//~^ ERROR unresolved name: `k0`.
2727
}
2828
}
2929
fail!();

0 commit comments

Comments
 (0)