mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 21:47:15 +03:00
Adjust error messages for compile-fail tests.
This commit is contained in:
@@ -4842,7 +4842,8 @@ fn find_best_match_for_name(@mut self, name: &str) -> Option<~str> {
|
||||
|
||||
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 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 @@ struct siphash {
|
||||
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 mk_result(st : sipstate) -> u64 {
|
||||
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!();
|
||||
|
||||
Reference in New Issue
Block a user