Adjust error messages for compile-fail tests.
This commit is contained in:
parent
f460c2adf8
commit
a0866d0166
src
librustc/middle
test/compile-fail
@ -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))
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 {}
|
||||
|
||||
|
@ -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 {}
|
||||
|
@ -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"); }
|
||||
|
||||
|
@ -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`.
|
||||
}
|
||||
|
@ -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`.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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); }
|
||||
}
|
||||
|
@ -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!();
|
||||
|
Loading…
x
Reference in New Issue
Block a user