1
Fork 0

delete more cfg(bootstrap)

This commit is contained in:
Lukas Markeffsky 2022-12-26 22:01:53 +01:00 committed by Mark Rousskov
parent 11191279b7
commit fdf6cc34b2
4 changed files with 22 additions and 38 deletions

View file

@ -2164,18 +2164,11 @@ pub fn id() -> u32 {
/// to provide similar functionality.
#[cfg_attr(not(test), lang = "termination")]
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
#[rustc_on_unimplemented(
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}`"
)
)]
#[rustc_on_unimplemented(on(
cause = "MainFunctionType",
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.
/// This status code is returned to the operating system.