Skip to content

Commit 0643494

Browse files
committed
Fix tests
1 parent 61ea8b3 commit 0643494

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

src/test/compile-fail/issue-22426-1.rs

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

1111
fn main() {
1212
match 42 {
13-
x < 7 => (), //~ ERROR unexpected token `<`
13+
x < 7 => (),
14+
//~^ error: unexpected token: `<`
1415
_ => ()
1516
}
1617
}

src/test/compile-fail/issue-22426-2.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
fn a(B<) {} //~ ERROR unexpected token `<`
11+
fn a(B<) {}
12+
//~^ error: unexpected token: `<`

src/test/compile-fail/issue-22426.rs renamed to src/test/compile-fail/issue-22426-3.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ struct Foo<T>(T, T);
1313
impl<T> Foo<T> {
1414
fn foo(&self) {
1515
match *self {
16-
Foo<T>(x, y) => { //~ ERROR unexpected token `<`
16+
Foo<T>(x, y) => {
17+
//~^ error: unexpected token: `<`
1718
println!("Goodbye, World!")
1819
}
1920
}

src/test/run-pass/issue-22426.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ struct Foo<T>(T, T);
1313
impl<T> Foo<T> {
1414
fn foo(&self) {
1515
match *self {
16-
Foo::<T>(ref x, ref y) => { //~ ERROR unexpected token `<`
16+
Foo::<T>(ref x, ref y) => {
1717
println!("Goodbye, World!")
1818
}
1919
}
2020
}
2121
}
22+
23+
fn main() {
24+
match 42 {
25+
x if x < 7 => (),
26+
_ => ()
27+
}
28+
}

0 commit comments

Comments
 (0)