Skip to content

Commit be29e52

Browse files
committed
Match against friendly error message
1 parent e5a55e7 commit be29e52

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/compile-fail/rfc-1937-termination-trait/termination-trait-main-i32.rs

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

11+
// error-pattern:`main` can only return types that implement std::process::Termination, not `i32`
1112
fn main() -> i32 {
12-
//~^ ERROR the trait bound `i32: std::process::Termination` is not satisfied [E0277]
1313
0
1414
}

src/test/compile-fail/rfc-1937-termination-trait/termination-trait-main-wrong-type.rs

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

11+
// error-pattern:`main` can only return types that implement std::process::Termination, not `char
1112
fn main() -> char {
12-
//~^ ERROR: the trait bound `char: std::process::Termination` is not satisfied
1313
' '
1414
}

0 commit comments

Comments
 (0)