X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Fstd%2Fsrc%2Fprocess.rs;h=400d25beb26f3d521387b5933e8a30ab6d1507b2;hb=00876c68c46d892790957931384d15d643de32fa;hp=b8249a027ad99445cc90a0f51f749b3ba12f7a93;hpb=98a5ac269cffada469753ad2416717e251863f9a;p=rust.git diff --git a/library/std/src/process.rs b/library/std/src/process.rs index b8249a027ad..400d25beb26 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -2154,8 +2154,16 @@ pub fn id() -> u32 { #[cfg_attr(not(test), lang = "termination")] #[stable(feature = "termination_trait_lib", since = "1.61.0")] #[rustc_on_unimplemented( - message = "`main` has invalid return type `{Self}`", - label = "`main` can only return types that implement `{Termination}`" + on( + all(not(bootstrap), cause = "MainFunctionType"), + message = "`main` has invalid return type `{Self}`", + label = "`main` can only return types that implement `{Termination}`" + ), + on( + bootstrap, + message = "`main` has invalid return type `{Self}`", + label = "`main` can only return types that implement `{Termination}`" + ) )] pub trait Termination { /// Is called to get the representation of the value as status code.