]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/process.rs
Auto merge of #105271 - eduardosm:inline-always-int-conv, r=scottmcm
[rust.git] / library / std / src / process.rs
index b8249a027ad99445cc90a0f51f749b3ba12f7a93..400d25beb26f3d521387b5933e8a30ab6d1507b2 100644 (file)
@@ -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.