Skip to content

Commit 394f455

Browse files
committed
Fix error messages in test cases, since fns/traits now pretty-print with a bounds list
1 parent fcf3617 commit 394f455

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/test/compile-fail/class-cast-to-trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
5858

5959
fn main() {
6060
let nyan : @noisy = @cat(0, 2, ~"nyan") as @noisy;
61-
nyan.eat(); //~ ERROR type `@noisy` does not implement any method in scope named `eat`
61+
nyan.eat(); //~ ERROR does not implement any method in scope named `eat`
6262
}

src/test/compile-fail/extern-wrong-value-type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ extern fn f() {
1313

1414
fn main() {
1515
// extern functions are *u8 types
16-
let _x: &fn() = f; //~ ERROR mismatched types: expected `&fn()` but found `*u8`
16+
let _x: &fn() = f; //~ ERROR found `*u8`
1717
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
fn foopy() {}
1212

13-
static f: &'static fn() = foopy; //~ ERROR mismatched types: expected `&'static fn()`
13+
static f: &'static fn() = foopy; //~ ERROR found extern fn
1414

1515
fn main () {
1616
f();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ pub enum TraitWrapper {
1616

1717
fn get_tw_map<'lt>(tw: &'lt TraitWrapper) -> &'lt MyTrait {
1818
match *tw {
19-
A(~ref map) => map, //~ ERROR mismatched types: expected `~MyTrait` but found a ~-box pattern
19+
A(~ref map) => map, //~ ERROR found a ~-box pattern
2020
}
2121
}
2222

23-
pub fn main() {}
23+
pub fn main() {}

src/test/compile-fail/map-types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ fn main() {
1717
let x: @Map<~str, ~str> = @HashMap::new::<~str, ~str>() as
1818
@Map<~str, ~str>;
1919
let y: @Map<uint, ~str> = @x;
20-
//~^ ERROR mismatched types: expected `@std::container::Map<uint,~str>`
20+
//~^ ERROR expected trait std::container::Map but found @-ptr
2121
}

src/test/compile-fail/missing-do.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
fn foo(f: &fn()) { f() }
1414

1515
fn main() {
16-
~"" || 42; //~ ERROR binary operation || cannot be applied to type `~str`
17-
foo || {}; //~ ERROR binary operation || cannot be applied to type `extern "Rust" fn(&fn())`
16+
~"" || 42; //~ ERROR binary operation || cannot be applied to type
17+
foo || {}; //~ ERROR binary operation || cannot be applied to type
1818
//~^ NOTE did you forget the `do` keyword for the call?
1919
}

0 commit comments

Comments
 (0)