Skip to content

Commit b6a8dd6

Browse files
committed
Mark std::process::ExitStatus as #[must_use]
For the same reason as `Result` is #[must_use] Cloess: #73127 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
1 parent 31f6acc commit b6a8dd6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/std/src/process.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,7 @@ impl From<fs::File> for Stdio {
14161416
/// [`wait`]: Child::wait
14171417
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
14181418
#[stable(feature = "process", since = "1.0.0")]
1419+
#[must_use = "this ExitStatus might represent an error that should be checked and handled"]
14191420
pub struct ExitStatus(imp::ExitStatus);
14201421

14211422
impl ExitStatus {

0 commit comments

Comments
 (0)