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 {
14441444#[ unstable( feature = "termination_trait_lib" , issue = "43301" ) ]
14451445#[ rustc_on_unimplemented(
14461446 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}` " ) ]
14481448pub trait Termination {
14491449 /// Is called to get the representation of the value as status code.
14501450 /// This status code is returned to the operating system.
Original file line number Diff line number Diff line change 1010
1111fn main ( ) -> i32 {
1212//~^ 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`
1414//~| HELP consider using `()`, or a `Result`
1515 0
1616}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error[E0277]: `main` has invalid return type `char`
22 --> $DIR/termination-trait-main-wrong-type.rs:11:14
33 |
44LL | 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`
66 |
77 = help: consider using `()`, or a `Result`
88
You can’t perform that action at this time.
0 commit comments