Skip to content

Commit

Permalink
Mark std::process::ExitStatus as #[must_use]
Browse files Browse the repository at this point in the history
For the same reason as `Result` is #[must_use]

Cloess: rust-lang#73127
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
  • Loading branch information
ijackson committed Jan 28, 2021
1 parent 31f6acc commit b6a8dd6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/std/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,7 @@ impl From<fs::File> for Stdio {
/// [`wait`]: Child::wait
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
#[stable(feature = "process", since = "1.0.0")]
#[must_use = "this ExitStatus might represent an error that should be checked and handled"]
pub struct ExitStatus(imp::ExitStatus);

impl ExitStatus {
Expand Down

0 comments on commit b6a8dd6

Please sign in to comment.