Skip to content

Commit abb02d4

Browse files
authored
Rollup merge of rust-lang#95452 - yaahc:termination-version-correction, r=ehuss
fix since field version for termination stabilization fixes incorrect version fields in stabilization of rust-lang#93840 r? `@ehuss`
2 parents 33730c8 + 09e7b0b commit abb02d4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

library/std/src/process.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -1705,25 +1705,25 @@ impl crate::error::Error for ExitStatusError {}
17051705
/// }
17061706
/// ```
17071707
#[derive(Clone, Copy, Debug)]
1708-
#[stable(feature = "process_exitcode", since = "1.60.0")]
1708+
#[stable(feature = "process_exitcode", since = "1.61.0")]
17091709
pub struct ExitCode(imp::ExitCode);
17101710

1711-
#[stable(feature = "process_exitcode", since = "1.60.0")]
1711+
#[stable(feature = "process_exitcode", since = "1.61.0")]
17121712
impl ExitCode {
17131713
/// The canonical `ExitCode` for successful termination on this platform.
17141714
///
17151715
/// Note that a `()`-returning `main` implicitly results in a successful
17161716
/// termination, so there's no need to return this from `main` unless
17171717
/// you're also returning other possible codes.
1718-
#[stable(feature = "process_exitcode", since = "1.60.0")]
1718+
#[stable(feature = "process_exitcode", since = "1.61.0")]
17191719
pub const SUCCESS: ExitCode = ExitCode(imp::ExitCode::SUCCESS);
17201720

17211721
/// The canonical `ExitCode` for unsuccessful termination on this platform.
17221722
///
17231723
/// If you're only returning this and `SUCCESS` from `main`, consider
17241724
/// instead returning `Err(_)` and `Ok(())` respectively, which will
17251725
/// return the same codes (but will also `eprintln!` the error).
1726-
#[stable(feature = "process_exitcode", since = "1.60.0")]
1726+
#[stable(feature = "process_exitcode", since = "1.61.0")]
17271727
pub const FAILURE: ExitCode = ExitCode(imp::ExitCode::FAILURE);
17281728
}
17291729

@@ -1747,7 +1747,7 @@ impl ExitCode {
17471747
}
17481748
}
17491749

1750-
#[stable(feature = "process_exitcode", since = "1.60.0")]
1750+
#[stable(feature = "process_exitcode", since = "1.61.0")]
17511751
impl From<u8> for ExitCode {
17521752
/// Construct an `ExitCode` from an arbitrary u8 value.
17531753
fn from(code: u8) -> Self {
@@ -2092,27 +2092,27 @@ pub fn id() -> u32 {
20922092
/// standard library's runtime for convenience. Other runtimes are not required
20932093
/// to provide similar functionality.
20942094
#[cfg_attr(not(test), lang = "termination")]
2095-
#[stable(feature = "termination_trait_lib", since = "1.60.0")]
2095+
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
20962096
#[rustc_on_unimplemented(
20972097
message = "`main` has invalid return type `{Self}`",
20982098
label = "`main` can only return types that implement `{Termination}`"
20992099
)]
21002100
pub trait Termination {
21012101
/// Is called to get the representation of the value as status code.
21022102
/// This status code is returned to the operating system.
2103-
#[stable(feature = "termination_trait_lib", since = "1.60.0")]
2103+
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
21042104
fn report(self) -> ExitCode;
21052105
}
21062106

2107-
#[stable(feature = "termination_trait_lib", since = "1.60.0")]
2107+
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
21082108
impl Termination for () {
21092109
#[inline]
21102110
fn report(self) -> ExitCode {
21112111
ExitCode::SUCCESS.report()
21122112
}
21132113
}
21142114

2115-
#[stable(feature = "termination_trait_lib", since = "1.60.0")]
2115+
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
21162116
impl<E: fmt::Debug> Termination for Result<(), E> {
21172117
fn report(self) -> ExitCode {
21182118
match self {
@@ -2122,14 +2122,14 @@ impl<E: fmt::Debug> Termination for Result<(), E> {
21222122
}
21232123
}
21242124

2125-
#[stable(feature = "termination_trait_lib", since = "1.60.0")]
2125+
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
21262126
impl Termination for ! {
21272127
fn report(self) -> ExitCode {
21282128
self
21292129
}
21302130
}
21312131

2132-
#[stable(feature = "termination_trait_lib", since = "1.60.0")]
2132+
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
21332133
impl<E: fmt::Debug> Termination for Result<!, E> {
21342134
fn report(self) -> ExitCode {
21352135
let Err(err) = self;
@@ -2138,15 +2138,15 @@ impl<E: fmt::Debug> Termination for Result<!, E> {
21382138
}
21392139
}
21402140

2141-
#[stable(feature = "termination_trait_lib", since = "1.60.0")]
2141+
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
21422142
impl<E: fmt::Debug> Termination for Result<Infallible, E> {
21432143
fn report(self) -> ExitCode {
21442144
let Err(err) = self;
21452145
Err::<!, _>(err).report()
21462146
}
21472147
}
21482148

2149-
#[stable(feature = "termination_trait_lib", since = "1.60.0")]
2149+
#[stable(feature = "termination_trait_lib", since = "1.61.0")]
21502150
impl Termination for ExitCode {
21512151
#[inline]
21522152
fn report(self) -> ExitCode {

0 commit comments

Comments
 (0)