]> git.lizzy.rs Git - rust.git/commitdiff
std: Deprecate the `exit_status` feature
authorAlex Crichton <alex@alexcrichton.com>
Thu, 11 Jun 2015 01:54:35 +0000 (18:54 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 17 Jun 2015 16:07:17 +0000 (09:07 -0700)
These two functions should be replaceable with the `process::exit` function.

src/libstd/env.rs

index 7f83f0763c640363ae7e956d4af1ac97694f83f6..2e00e126e2378f8b7f9d385e4d184ad35b9d4411 100644 (file)
@@ -486,6 +486,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
 ///
 /// Note that this is not synchronized against modifications of other threads.
 #[unstable(feature = "exit_status", reason = "managing the exit status may change")]
+#[deprecated(since = "1.2.0", reason = "use process::exit instead")]
 pub fn set_exit_status(code: i32) {
     EXIT_STATUS.store(code as isize, Ordering::SeqCst)
 }
@@ -493,6 +494,7 @@ pub fn set_exit_status(code: i32) {
 /// Fetches the process's current exit code. This defaults to 0 and can change
 /// by calling `set_exit_status`.
 #[unstable(feature = "exit_status", reason = "managing the exit status may change")]
+#[deprecated(since = "1.2.0", reason = "use process::exit instead")]
 pub fn get_exit_status() -> i32 {
     EXIT_STATUS.load(Ordering::SeqCst) as i32
 }