Skip to content

Commit 0353c8a

Browse files
committed
Improve test error message expectation
1 parent a523584 commit 0353c8a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/test/ui/issues/issue-24036.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn closure_from_match() {
1010
2 => |c| c - 1,
1111
_ => |c| c - 1
1212
};
13-
//~^^^^ ERROR 9:15: 9:16: type annotations needed [E0282]
13+
//~^^^^ ERROR type annotations needed
1414
}
1515

1616
fn main() { }

src/test/ui/issues/issue-46742-3.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn main() {
99
"-" => |a, b| (a - b + cap) as i32,
1010
_ => unimplemented!(),
1111
})(5, 5);
12-
//~^^^ ERROR 9:16: 9:43: `match` arms have incompatible types [E0308]
12+
//~^^^ ERROR `match` arms have incompatible types
1313

1414

1515
// We shouldn't coerce capturing closure to a non-capturing closure
@@ -18,7 +18,7 @@ fn main() {
1818
"-" => |a, b| (a - b + cap) as i32,
1919
_ => unimplemented!(),
2020
})(5, 5);
21-
//~^^^ ERROR 18:16: 18:43: `match` arms have incompatible types [E0308]
21+
//~^^^ ERROR `match` arms have incompatible types
2222

2323

2424
// We shouldn't coerce non-capturing closure to a capturing closure
@@ -27,13 +27,13 @@ fn main() {
2727
"-" => |a, b| (a - b) as i32,
2828
_ => unimplemented!(),
2929
})(5, 5);
30-
//~^^^ ERROR 27:16: 27:37: `match` arms have incompatible types [E0308]
30+
//~^^^ ERROR `match` arms have incompatible types
3131

3232
// We shouldn't coerce capturing closure to a capturing closure
3333
let _ = (match "+" {
3434
"+" => |a, b| (a + b + cap) as i32,
3535
"-" => |a, b| (a - b + cap) as i32,
3636
_ => unimplemented!(),
3737
})(5, 5);
38-
//~^^^ ERROR 35:16: 35:43: `match` arms have incompatible types [E0308]
38+
//~^^^ ERROR `match` arms have incompatible types
3939
}

0 commit comments

Comments
 (0)