Skip to content

Commit 96cce02

Browse files
committed
std: Deprecate the exit_status feature
These two functions should be replaceable with the `process::exit` function.
1 parent 0d818b4 commit 96cce02

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libstd/env.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,15 @@ static EXIT_STATUS: AtomicIsize = AtomicIsize::new(0);
486486
///
487487
/// Note that this is not synchronized against modifications of other threads.
488488
#[unstable(feature = "exit_status", reason = "managing the exit status may change")]
489+
#[deprecated(since = "1.2.0", reason = "use process::exit instead")]
489490
pub fn set_exit_status(code: i32) {
490491
EXIT_STATUS.store(code as isize, Ordering::SeqCst)
491492
}
492493

493494
/// Fetches the process's current exit code. This defaults to 0 and can change
494495
/// by calling `set_exit_status`.
495496
#[unstable(feature = "exit_status", reason = "managing the exit status may change")]
497+
#[deprecated(since = "1.2.0", reason = "use process::exit instead")]
496498
pub fn get_exit_status() -> i32 {
497499
EXIT_STATUS.load(Ordering::SeqCst) as i32
498500
}

0 commit comments

Comments
 (0)