Skip to content

Commit 6e2119e

Browse files
committed
Stabilize termination_trait_lib
1 parent f4a421e commit 6e2119e

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/libstd/process.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -1583,23 +1583,24 @@ pub fn id() -> u32 {
15831583
/// The default implementations are returning `libc::EXIT_SUCCESS` to indicate
15841584
/// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned.
15851585
#[cfg_attr(not(test), lang = "termination")]
1586-
#[unstable(feature = "termination_trait_lib", issue = "43301")]
1586+
#[stable(feature = "termination_trait_lib", since = "1.33.0")]
15871587
#[rustc_on_unimplemented(
15881588
message="`main` has invalid return type `{Self}`",
15891589
label="`main` can only return types that implement `{Termination}`")]
15901590
pub trait Termination {
15911591
/// Is called to get the representation of the value as status code.
15921592
/// This status code is returned to the operating system.
1593+
#[stable(feature = "termination_trait_lib", since = "1.33.0")]
15931594
fn report(self) -> i32;
15941595
}
15951596

1596-
#[unstable(feature = "termination_trait_lib", issue = "43301")]
1597+
#[stable(feature = "termination_trait_lib", since = "1.33.0")]
15971598
impl Termination for () {
15981599
#[inline]
15991600
fn report(self) -> i32 { ExitCode::SUCCESS.report() }
16001601
}
16011602

1602-
#[unstable(feature = "termination_trait_lib", issue = "43301")]
1603+
#[stable(feature = "termination_trait_lib", since = "1.33.0")]
16031604
impl<E: fmt::Debug> Termination for Result<(), E> {
16041605
fn report(self) -> i32 {
16051606
match self {
@@ -1609,12 +1610,12 @@ impl<E: fmt::Debug> Termination for Result<(), E> {
16091610
}
16101611
}
16111612

1612-
#[unstable(feature = "termination_trait_lib", issue = "43301")]
1613+
#[stable(feature = "termination_trait_lib", since = "1.33.0")]
16131614
impl Termination for ! {
16141615
fn report(self) -> i32 { self }
16151616
}
16161617

1617-
#[unstable(feature = "termination_trait_lib", issue = "43301")]
1618+
#[stable(feature = "termination_trait_lib", since = "1.33.0")]
16181619
impl<E: fmt::Debug> Termination for Result<!, E> {
16191620
fn report(self) -> i32 {
16201621
let Err(err) = self;
@@ -1623,7 +1624,7 @@ impl<E: fmt::Debug> Termination for Result<!, E> {
16231624
}
16241625
}
16251626

1626-
#[unstable(feature = "termination_trait_lib", issue = "43301")]
1627+
#[stable(feature = "termination_trait_lib", since = "1.33.0")]
16271628
impl Termination for ExitCode {
16281629
#[inline]
16291630
fn report(self) -> i32 {

src/libtest/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#![feature(set_stdio)]
4040
#![feature(panic_unwind)]
4141
#![feature(staged_api)]
42-
#![feature(termination_trait_lib)]
4342
#![feature(test)]
4443

4544
extern crate getopts;

src/test/run-pass/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs

-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@
99
// except according to those terms.
1010

1111
// run-pass
12-
#![feature(termination_trait_lib)]
1312

1413
fn main() -> impl std::process::Termination { }

0 commit comments

Comments
 (0)