@@ -1705,25 +1705,25 @@ impl crate::error::Error for ExitStatusError {}
1705
1705
/// }
1706
1706
/// ```
1707
1707
#[ derive( Clone , Copy , Debug ) ]
1708
- #[ stable( feature = "process_exitcode" , since = "1.60 .0" ) ]
1708
+ #[ stable( feature = "process_exitcode" , since = "1.61 .0" ) ]
1709
1709
pub struct ExitCode ( imp:: ExitCode ) ;
1710
1710
1711
- #[ stable( feature = "process_exitcode" , since = "1.60 .0" ) ]
1711
+ #[ stable( feature = "process_exitcode" , since = "1.61 .0" ) ]
1712
1712
impl ExitCode {
1713
1713
/// The canonical `ExitCode` for successful termination on this platform.
1714
1714
///
1715
1715
/// Note that a `()`-returning `main` implicitly results in a successful
1716
1716
/// termination, so there's no need to return this from `main` unless
1717
1717
/// 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" ) ]
1719
1719
pub const SUCCESS : ExitCode = ExitCode ( imp:: ExitCode :: SUCCESS ) ;
1720
1720
1721
1721
/// The canonical `ExitCode` for unsuccessful termination on this platform.
1722
1722
///
1723
1723
/// If you're only returning this and `SUCCESS` from `main`, consider
1724
1724
/// instead returning `Err(_)` and `Ok(())` respectively, which will
1725
1725
/// 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" ) ]
1727
1727
pub const FAILURE : ExitCode = ExitCode ( imp:: ExitCode :: FAILURE ) ;
1728
1728
}
1729
1729
@@ -1747,7 +1747,7 @@ impl ExitCode {
1747
1747
}
1748
1748
}
1749
1749
1750
- #[ stable( feature = "process_exitcode" , since = "1.60 .0" ) ]
1750
+ #[ stable( feature = "process_exitcode" , since = "1.61 .0" ) ]
1751
1751
impl From < u8 > for ExitCode {
1752
1752
/// Construct an `ExitCode` from an arbitrary u8 value.
1753
1753
fn from ( code : u8 ) -> Self {
@@ -2092,27 +2092,27 @@ pub fn id() -> u32 {
2092
2092
/// standard library's runtime for convenience. Other runtimes are not required
2093
2093
/// to provide similar functionality.
2094
2094
#[ 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" ) ]
2096
2096
#[ rustc_on_unimplemented(
2097
2097
message = "`main` has invalid return type `{Self}`" ,
2098
2098
label = "`main` can only return types that implement `{Termination}`"
2099
2099
) ]
2100
2100
pub trait Termination {
2101
2101
/// Is called to get the representation of the value as status code.
2102
2102
/// 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" ) ]
2104
2104
fn report ( self ) -> ExitCode ;
2105
2105
}
2106
2106
2107
- #[ stable( feature = "termination_trait_lib" , since = "1.60 .0" ) ]
2107
+ #[ stable( feature = "termination_trait_lib" , since = "1.61 .0" ) ]
2108
2108
impl Termination for ( ) {
2109
2109
#[ inline]
2110
2110
fn report ( self ) -> ExitCode {
2111
2111
ExitCode :: SUCCESS . report ( )
2112
2112
}
2113
2113
}
2114
2114
2115
- #[ stable( feature = "termination_trait_lib" , since = "1.60 .0" ) ]
2115
+ #[ stable( feature = "termination_trait_lib" , since = "1.61 .0" ) ]
2116
2116
impl < E : fmt:: Debug > Termination for Result < ( ) , E > {
2117
2117
fn report ( self ) -> ExitCode {
2118
2118
match self {
@@ -2122,14 +2122,14 @@ impl<E: fmt::Debug> Termination for Result<(), E> {
2122
2122
}
2123
2123
}
2124
2124
2125
- #[ stable( feature = "termination_trait_lib" , since = "1.60 .0" ) ]
2125
+ #[ stable( feature = "termination_trait_lib" , since = "1.61 .0" ) ]
2126
2126
impl Termination for ! {
2127
2127
fn report ( self ) -> ExitCode {
2128
2128
self
2129
2129
}
2130
2130
}
2131
2131
2132
- #[ stable( feature = "termination_trait_lib" , since = "1.60 .0" ) ]
2132
+ #[ stable( feature = "termination_trait_lib" , since = "1.61 .0" ) ]
2133
2133
impl < E : fmt:: Debug > Termination for Result < !, E > {
2134
2134
fn report ( self ) -> ExitCode {
2135
2135
let Err ( err) = self ;
@@ -2138,15 +2138,15 @@ impl<E: fmt::Debug> Termination for Result<!, E> {
2138
2138
}
2139
2139
}
2140
2140
2141
- #[ stable( feature = "termination_trait_lib" , since = "1.60 .0" ) ]
2141
+ #[ stable( feature = "termination_trait_lib" , since = "1.61 .0" ) ]
2142
2142
impl < E : fmt:: Debug > Termination for Result < Infallible , E > {
2143
2143
fn report ( self ) -> ExitCode {
2144
2144
let Err ( err) = self ;
2145
2145
Err :: < !, _ > ( err) . report ( )
2146
2146
}
2147
2147
}
2148
2148
2149
- #[ stable( feature = "termination_trait_lib" , since = "1.60 .0" ) ]
2149
+ #[ stable( feature = "termination_trait_lib" , since = "1.61 .0" ) ]
2150
2150
impl Termination for ExitCode {
2151
2151
#[ inline]
2152
2152
fn report ( self ) -> ExitCode {
0 commit comments