@@ -1583,23 +1583,24 @@ pub fn id() -> u32 {
1583
1583
/// The default implementations are returning `libc::EXIT_SUCCESS` to indicate
1584
1584
/// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned.
1585
1585
#[ cfg_attr( not( test) , lang = "termination" ) ]
1586
- #[ unstable ( feature = "termination_trait_lib" , issue = "43301 " ) ]
1586
+ #[ stable ( feature = "termination_trait_lib" , since = "1.33.0 " ) ]
1587
1587
#[ rustc_on_unimplemented(
1588
1588
message="`main` has invalid return type `{Self}`" ,
1589
1589
label="`main` can only return types that implement `{Termination}`" ) ]
1590
1590
pub trait Termination {
1591
1591
/// Is called to get the representation of the value as status code.
1592
1592
/// This status code is returned to the operating system.
1593
+ #[ stable( feature = "termination_trait_lib" , since = "1.33.0" ) ]
1593
1594
fn report ( self ) -> i32 ;
1594
1595
}
1595
1596
1596
- #[ unstable ( feature = "termination_trait_lib" , issue = "43301 " ) ]
1597
+ #[ stable ( feature = "termination_trait_lib" , since = "1.33.0 " ) ]
1597
1598
impl Termination for ( ) {
1598
1599
#[ inline]
1599
1600
fn report ( self ) -> i32 { ExitCode :: SUCCESS . report ( ) }
1600
1601
}
1601
1602
1602
- #[ unstable ( feature = "termination_trait_lib" , issue = "43301 " ) ]
1603
+ #[ stable ( feature = "termination_trait_lib" , since = "1.33.0 " ) ]
1603
1604
impl < E : fmt:: Debug > Termination for Result < ( ) , E > {
1604
1605
fn report ( self ) -> i32 {
1605
1606
match self {
@@ -1609,12 +1610,12 @@ impl<E: fmt::Debug> Termination for Result<(), E> {
1609
1610
}
1610
1611
}
1611
1612
1612
- #[ unstable ( feature = "termination_trait_lib" , issue = "43301 " ) ]
1613
+ #[ stable ( feature = "termination_trait_lib" , since = "1.33.0 " ) ]
1613
1614
impl Termination for ! {
1614
1615
fn report ( self ) -> i32 { self }
1615
1616
}
1616
1617
1617
- #[ unstable ( feature = "termination_trait_lib" , issue = "43301 " ) ]
1618
+ #[ stable ( feature = "termination_trait_lib" , since = "1.33.0 " ) ]
1618
1619
impl < E : fmt:: Debug > Termination for Result < !, E > {
1619
1620
fn report ( self ) -> i32 {
1620
1621
let Err ( err) = self ;
@@ -1623,7 +1624,7 @@ impl<E: fmt::Debug> Termination for Result<!, E> {
1623
1624
}
1624
1625
}
1625
1626
1626
- #[ unstable ( feature = "termination_trait_lib" , issue = "43301 " ) ]
1627
+ #[ stable ( feature = "termination_trait_lib" , since = "1.33.0 " ) ]
1627
1628
impl Termination for ExitCode {
1628
1629
#[ inline]
1629
1630
fn report ( self ) -> i32 {
0 commit comments