rust/library
Manish Goregaokar e4d257e1d3
Rollup merge of #88305 - ijackson:exitstatus-debug, r=dtolnay
Manual Debug for Unix ExitCode ExitStatus ExitStatusError

These structs have misleading names.  An ExitStatus[Error] is actually a Unix wait status; an ExitCode is actually an exit status.  These misleading names appear in the `Debug` output.

The `Display` impls on Unix have been improved, but the `Debug` impls are still misleading, as reported in #74832.

Fix this by pretending that these internal structs are called `unix_exit_status` and `unix_wait_status` as applicable.  (We can't actually rename the structs because of the way that the cross-platform machinery works: the names are cross-platform.)

After this change, this program
```
#![feature(exit_status_error)]
fn main(){
    let x = std::process::Command::new("false").status().unwrap();
    dbg!(x.exit_ok());
    eprintln!("x={:?}",x);
}
```
produces this output
```
[src/main.rs:4] x.exit_ok() = Err(
    ExitStatusError(
        unix_wait_status(
            256,
        ),
    ),
)
x=ExitStatus(unix_wait_status(256))
```

Closes #74832
2021-10-03 23:13:18 -07:00
..
alloc Rollup merge of #87679 - ssomers:btree_comments, r=joshtriplett 2021-10-03 23:13:16 -07:00
backtrace@cc89bb66f9 Update the backtrace crate 2021-09-15 20:32:35 +02:00
core Rollup merge of #87910 - iago-lito:mark_unsafe_nonzero_arithmetics_as_const, r=joshtriplett 2021-10-03 23:13:17 -07:00
panic_abort Add SOLID targets 2021-09-28 11:31:47 +09:00
panic_unwind Add SOLID targets 2021-09-28 11:31:47 +09:00
proc_macro Rollup merge of #86165 - m-ou-se:proc-macro-span-shrink, r=dtolnay 2021-09-10 08:23:14 -07:00
profiler_builtins rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rtstartup
rustc-std-workspace-alloc rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc-std-workspace-core rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc-std-workspace-std rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
std Rollup merge of #88305 - ijackson:exitstatus-debug, r=dtolnay 2021-10-03 23:13:18 -07:00
stdarch@5fdbc476af Update stdarch submodule 2021-09-21 11:24:08 +02:00
test Rollup merge of #89235 - yaahc:junit-formatting, r=kennytm 2021-09-28 20:00:15 +02:00
unwind Add SOLID targets 2021-09-28 11:31:47 +09:00