Rollup merge of #114588 - ijackson:exit-status-default-2, r=m-ou-se
Improve docs for impl Default for ExitStatus This addresses a review comment in #106425 (which is on the way to being merged I think). Some of the other followup work is more complicated so I'm going to do individual MRs. ~~Note this branch is on top of #106425~~
This commit is contained in:
commit
0587893f6d
@ -1530,10 +1530,19 @@ fn from(file: fs::File) -> Stdio {
|
||||
// vs `_exit`. Naming of Unix system calls is not standardised across Unices, so terminology is a
|
||||
// matter of convention and tradition. For clarity we usually speak of `exit`, even when we might
|
||||
// mean an underlying system call such as `_exit`.
|
||||
#[derive(PartialEq, Eq, Clone, Copy, Debug, Default)]
|
||||
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
|
||||
#[stable(feature = "process", since = "1.0.0")]
|
||||
pub struct ExitStatus(imp::ExitStatus);
|
||||
|
||||
/// The default value is one which indicates successful completion.
|
||||
#[stable(feature = "process-exitcode-default", since = "CURRENT_RUSTC_VERSION")]
|
||||
impl Default for ExitStatus {
|
||||
fn default() -> Self {
|
||||
// Ideally this would be done by ExitCode::default().into() but that is complicated.
|
||||
ExitStatus::from_inner(imp::ExitStatus::default())
|
||||
}
|
||||
}
|
||||
|
||||
/// Allows extension traits within `std`.
|
||||
#[unstable(feature = "sealed", issue = "none")]
|
||||
impl crate::sealed::Sealed for ExitStatus {}
|
||||
|
Loading…
Reference in New Issue
Block a user