diff options
| author | bors <bors@rust-lang.org> | 2023-08-08 22:00:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-08 22:00:40 +0000 |
| commit | e3590fccfbdb6284bded9b70eca2e72b0c57e070 (patch) | |
| tree | 6b0ef3943c464411c0901a8d3dc0b35464faf914 /library/std/src/sys | |
| parent | f88a8b71cebb730cbd5058c45ebcae1d4d9be377 (diff) | |
| parent | a5e91edaa0c047dcf30d8697efc356a3a85191c2 (diff) | |
| download | rust-e3590fccfbdb6284bded9b70eca2e72b0c57e070.tar.gz rust-e3590fccfbdb6284bded9b70eca2e72b0c57e070.zip | |
Auto merge of #114637 - matthiaskrgr:rollup-544y8p5, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - #106425 (Make ExitStatus implement Default) - #113480 (add aarch64-unknown-teeos target) - #113586 (Mention style for new syntax in tracking issue template) - #113593 (CFI: Fix error compiling core with LLVM CFI enabled) - #114612 (update llvm-wrapper include to silence deprecation warning) - #114613 (Prevent constant rebuilds of `rustc-main` (and thus everything else)) - #114615 (interpret: remove incomplete protection against invalid where clauses) - #114628 (Allowing re-implementation of mir_drops_elaborated query) - #114629 (tests: Uncomment now valid GAT code behind FIXME) - #114630 (Migrate GUI colors test to original CSS color format) - #114631 (add provisional cache test for new solver) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/unix/process/process_fuchsia.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/unix/process/process_unix.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/unix/process/process_unsupported.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/unix/process/process_vxworks.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/unsupported/process.rs | 37 | ||||
| -rw-r--r-- | library/std/src/sys/windows/process.rs | 2 |
6 files changed, 24 insertions, 23 deletions
diff --git a/library/std/src/sys/unix/process/process_fuchsia.rs b/library/std/src/sys/unix/process/process_fuchsia.rs index e45c380a0bb..9931c2af2f1 100644 --- a/library/std/src/sys/unix/process/process_fuchsia.rs +++ b/library/std/src/sys/unix/process/process_fuchsia.rs @@ -235,7 +235,7 @@ impl Process { } } -#[derive(PartialEq, Eq, Clone, Copy, Debug)] +#[derive(PartialEq, Eq, Clone, Copy, Debug, Default)] pub struct ExitStatus(i64); impl ExitStatus { diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs index 0ce93af66ac..d87a28f2f65 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/unix/process/process_unix.rs @@ -800,7 +800,7 @@ impl Process { // // This is not actually an "exit status" in Unix terminology. Rather, it is a "wait status". // See the discussion in comments and doc comments for `std::process::ExitStatus`. -#[derive(PartialEq, Eq, Clone, Copy)] +#[derive(PartialEq, Eq, Clone, Copy, Default)] pub struct ExitStatus(c_int); impl fmt::Debug for ExitStatus { diff --git a/library/std/src/sys/unix/process/process_unsupported.rs b/library/std/src/sys/unix/process/process_unsupported.rs index f28ca58d020..8e0b971af73 100644 --- a/library/std/src/sys/unix/process/process_unsupported.rs +++ b/library/std/src/sys/unix/process/process_unsupported.rs @@ -55,7 +55,7 @@ impl Process { } } -#[derive(PartialEq, Eq, Clone, Copy, Debug)] +#[derive(PartialEq, Eq, Clone, Copy, Debug, Default)] pub struct ExitStatus(c_int); impl ExitStatus { diff --git a/library/std/src/sys/unix/process/process_vxworks.rs b/library/std/src/sys/unix/process/process_vxworks.rs index f70d3cb396b..1ff2b2fb383 100644 --- a/library/std/src/sys/unix/process/process_vxworks.rs +++ b/library/std/src/sys/unix/process/process_vxworks.rs @@ -179,7 +179,7 @@ impl Process { } /// Unix exit statuses -#[derive(PartialEq, Eq, Clone, Copy, Debug)] +#[derive(PartialEq, Eq, Clone, Copy, Debug, Default)] pub struct ExitStatus(c_int); impl ExitStatus { diff --git a/library/std/src/sys/unsupported/process.rs b/library/std/src/sys/unsupported/process.rs index a494f2d6b4c..77b675aaa4e 100644 --- a/library/std/src/sys/unsupported/process.rs +++ b/library/std/src/sys/unsupported/process.rs @@ -99,58 +99,59 @@ impl fmt::Debug for Command { } } -pub struct ExitStatus(!); +#[derive(PartialEq, Eq, Clone, Copy, Debug, Default)] +#[non_exhaustive] +pub struct ExitStatus(); impl ExitStatus { pub fn exit_ok(&self) -> Result<(), ExitStatusError> { - self.0 + Ok(()) } pub fn code(&self) -> Option<i32> { - self.0 + Some(0) } } -impl Clone for ExitStatus { - fn clone(&self) -> ExitStatus { - self.0 +impl fmt::Display for ExitStatus { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "<dummy exit status>") } } -impl Copy for ExitStatus {} +pub struct ExitStatusError(!); -impl PartialEq for ExitStatus { - fn eq(&self, _other: &ExitStatus) -> bool { +impl Clone for ExitStatusError { + fn clone(&self) -> ExitStatusError { self.0 } } -impl Eq for ExitStatus {} +impl Copy for ExitStatusError {} -impl fmt::Debug for ExitStatus { - fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { +impl PartialEq for ExitStatusError { + fn eq(&self, _other: &ExitStatusError) -> bool { self.0 } } -impl fmt::Display for ExitStatus { +impl Eq for ExitStatusError {} + +impl fmt::Debug for ExitStatusError { fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { self.0 } } -#[derive(PartialEq, Eq, Clone, Copy, Debug)] -pub struct ExitStatusError(ExitStatus); - impl Into<ExitStatus> for ExitStatusError { fn into(self) -> ExitStatus { - self.0.0 + self.0 } } impl ExitStatusError { pub fn code(self) -> Option<NonZeroI32> { - self.0.0 + self.0 } } diff --git a/library/std/src/sys/windows/process.rs b/library/std/src/sys/windows/process.rs index e3493cbb850..2dd0c67acdb 100644 --- a/library/std/src/sys/windows/process.rs +++ b/library/std/src/sys/windows/process.rs @@ -652,7 +652,7 @@ impl Process { } } -#[derive(PartialEq, Eq, Clone, Copy, Debug)] +#[derive(PartialEq, Eq, Clone, Copy, Debug, Default)] pub struct ExitStatus(c::DWORD); impl ExitStatus { |
