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 {
2154
2154
#[ cfg_attr( not( test) , lang = "termination" ) ]
2155
2155
#[ stable( feature = "termination_trait_lib" , since = "1.61.0" ) ]
2156
2156
#[ 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
+ )
2159
2167
) ]
2160
2168
pub trait Termination {
2161
2169
/// Is called to get the representation of the value as status code.
You can’t perform that action at this time.
0 commit comments