about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2021-05-11 18:09:03 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2021-05-12 11:12:20 +0100
commit26c782b8e7f939a00f889dfb3f1e969fc8f8c79d (patch)
treeaa126e25868151099bd260ce9016de23c84af498 /library/std/src
parent46871539e47f04a9c255213bffa909d7556d1448 (diff)
downloadrust-26c782b8e7f939a00f889dfb3f1e969fc8f8c79d.tar.gz
rust-26c782b8e7f939a00f889dfb3f1e969fc8f8c79d.zip
ExitStatusError: Remove mentions in stable docs
We should revert this commit when this is stabilised.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/os/unix/process.rs30
1 files changed, 3 insertions, 27 deletions
diff --git a/library/std/src/os/unix/process.rs b/library/std/src/os/unix/process.rs
index 21da8ba15de..8b98a22f768 100644
--- a/library/std/src/os/unix/process.rs
+++ b/library/std/src/os/unix/process.rs
@@ -198,10 +198,10 @@ impl CommandExt for process::Command {
 /// Unix-specific extensions to [`process::ExitStatus`] and
 /// [`ExitStatusError`](process::ExitStatusError).
 ///
-/// On Unix, `ExitStatus` and `ExitStatusError` **do not necessarily represent an exit status**, as
+/// On Unix, `ExitStatus` **does not necessarily represent an exit status**, as
 /// passed to the `exit` system call or returned by
-/// [`ExitStatus::code()`](crate::process::ExitStatus::code).  They represents **any wait status**
-/// (or any nonzero wait status, respectively), as returned by one of the `wait` family of system
+/// [`ExitStatus::code()`](crate::process::ExitStatus::code).  It represents **any wait status**
+/// as returned by one of the `wait` family of system
 /// calls.
 ///
 /// A Unix wait status (a Rust `ExitStatus`) can represent a Unix exit status, but can also
@@ -227,30 +227,6 @@ pub trait ExitStatusExt: Sealed {
     /// If the process was terminated by a signal, returns that signal.
     ///
     /// In other words, if `WIFSIGNALED`, this returns `WTERMSIG`.
-    ///
-    /// # Examples
-    /// ```
-    /// #![feature(exit_status_error)]
-    /// use std::process::{Command, ExitStatusError};
-    /// use std::os::unix::process::ExitStatusExt;
-    ///
-    /// fn run(script: &str) -> Result<(), ExitStatusError> {
-    ///     Command::new("sh").args(&["-ec",script])
-    ///         .status().expect("failed to fork/exec sh")
-    ///         .exit_ok()
-    ///         .or_else(|bad| {
-    ///             if bad.signal() == Some(13) /*PIPE*/ {
-    ///                 Ok(())
-    ///             } else {
-    ///                 Err(bad)
-    ///             }
-    ///         })
-    /// }
-    ///
-    /// run("exit").unwrap();
-    /// run("kill -PIPE $$").unwrap();
-    /// run("exit 42").unwrap_err();
-    /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn signal(&self) -> Option<i32>;