about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-18 13:35:43 +0000
committerbors <bors@rust-lang.org>2022-10-18 13:35:43 +0000
commite94827e5b09b5b098ea10d0c57a84892fc73b5a7 (patch)
tree1b68930008142c76d8d72208ab23fd192ba04884 /library/std/src
parent21b246587c2687935bd6004ffa5dcc4f4dd6600d (diff)
parent6e7d206a7bd2ea10c151a0916e3f325b14e91311 (diff)
downloadrust-e94827e5b09b5b098ea10d0c57a84892fc73b5a7.tar.gz
rust-e94827e5b09b5b098ea10d0c57a84892fc73b5a7.zip
Auto merge of #103188 - JohnTitor:rollup-pwilam1, r=JohnTitor
Rollup of 6 pull requests

Successful merges:

 - #103023 (Adding `fuchsia-ignore` and `needs-unwind` to compiler test cases)
 - #103142 (Make diagnostic for unsatisfied `Termination` bounds more precise)
 - #103154 (Fix typo in `ReverseSearcher` docs)
 - #103159 (Remove the redundant `Some(try_opt!(..))` in `checked_pow`)
 - #103163 (Remove all uses of array_assume_init)
 - #103168 (Stabilize asm_sym)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/process.rs12
1 files changed, 10 insertions, 2 deletions
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.