Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bombless committed Feb 19, 2015
1 parent 61ea8b3 commit 0643494
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/test/compile-fail/issue-22426-1.rs
Expand Up @@ -10,7 +10,8 @@

fn main() {
match 42 {
x < 7 => (), //~ ERROR unexpected token `<`
x < 7 => (),
//~^ error: unexpected token: `<`
_ => ()
}
}
3 changes: 2 additions & 1 deletion src/test/compile-fail/issue-22426-2.rs
Expand Up @@ -8,4 +8,5 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

fn a(B<) {} //~ ERROR unexpected token `<`
fn a(B<) {}
//~^ error: unexpected token: `<`
Expand Up @@ -13,7 +13,8 @@ struct Foo<T>(T, T);
impl<T> Foo<T> {
fn foo(&self) {
match *self {
Foo<T>(x, y) => { //~ ERROR unexpected token `<`
Foo<T>(x, y) => {
//~^ error: unexpected token: `<`
println!("Goodbye, World!")
}
}
Expand Down
9 changes: 8 additions & 1 deletion src/test/run-pass/issue-22426.rs
Expand Up @@ -13,9 +13,16 @@ struct Foo<T>(T, T);
impl<T> Foo<T> {
fn foo(&self) {
match *self {
Foo::<T>(ref x, ref y) => { //~ ERROR unexpected token `<`
Foo::<T>(ref x, ref y) => {
println!("Goodbye, World!")
}
}
}
}

fn main() {
match 42 {
x if x < 7 => (),
_ => ()
}
}

0 comments on commit 0643494

Please sign in to comment.