File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -2154,8 +2154,16 @@ pub fn id() -> u32 {
21542154#[ cfg_attr( not( test) , lang = "termination" ) ]
21552155#[ stable( feature = "termination_trait_lib" , since = "1.61.0" ) ]
21562156#[ rustc_on_unimplemented(
2157- message = "`main` has invalid return type `{Self}`" ,
2158- label = "`main` can only return types that implement `{Termination}`"
2157+ on(
2158+ all( not( bootstrap) , cause = "MainFunctionType" ) ,
2159+ message = "`main` has invalid return type `{Self}`" ,
2160+ label = "`main` can only return types that implement `{Termination}`"
2161+ ) ,
2162+ on(
2163+ bootstrap,
2164+ message = "`main` has invalid return type `{Self}`" ,
2165+ label = "`main` can only return types that implement `{Termination}`"
2166+ )
21592167) ]
21602168pub trait Termination {
21612169 /// Is called to get the representation of the value as status code.
You can’t perform that action at this time.
0 commit comments