File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
compile-fail/rfc-1937-termination-trait
ui/rfc-1937-termination-trait Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1444,7 +1444,7 @@ pub fn id() -> u32 {
1444
1444
#[ unstable( feature = "termination_trait_lib" , issue = "43301" ) ]
1445
1445
#[ rustc_on_unimplemented(
1446
1446
message="`main` has invalid return type `{Self}`" ,
1447
- label="`main` can only return types that implement {Termination}" ) ]
1447
+ label="`main` can only return types that implement ` {Termination}` " ) ]
1448
1448
pub trait Termination {
1449
1449
/// Is called to get the representation of the value as status code.
1450
1450
/// This status code is returned to the operating system.
Original file line number Diff line number Diff line change 10
10
11
11
fn main ( ) -> i32 {
12
12
//~^ ERROR `main` has invalid return type `i32`
13
- //~| NOTE `main` can only return types that implement std::process::Termination
13
+ //~| NOTE `main` can only return types that implement ` std::process::Termination`
14
14
//~| HELP consider using `()`, or a `Result`
15
15
0
16
16
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error[E0277]: `main` has invalid return type `char`
2
2
--> $DIR/termination-trait-main-wrong-type.rs:11:14
3
3
|
4
4
LL | fn main() -> char { //~ ERROR
5
- | ^^^^ `main` can only return types that implement std::process::Termination
5
+ | ^^^^ `main` can only return types that implement ` std::process::Termination`
6
6
|
7
7
= help: consider using `()`, or a `Result`
8
8
You can’t perform that action at this time.
0 commit comments