-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide ExitStatusError #82973
Merged
Merged
Provide ExitStatusError #82973
Commits on May 10, 2021
-
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for b50c1bb - Browse repository at this point
Copy the full SHA b50c1bbView commit details
Commits on May 12, 2021
-
Closes rust-lang#73125 This is in pursuance of Issue rust-lang#73127 Consider adding #[must_use] to std::process::ExitStatus In MR rust-lang#81452 Add #[must_use] to [...] process::ExitStatus we concluded that the existing arrangements in are too awkward so adding that #[must_use] is blocked on improving the ergonomics. I wrote a mini-RFC-style discusion of the approach in rust-lang#73125 (comment) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for e893089 - Browse repository at this point
Copy the full SHA e893089View commit details -
unix: impl ExitStatusExt for ExitStatusError
It is unergnomic to have to say things like bad.into_status().signal() Implementing `ExitStatusExt` for `ExitStatusError` fixes this. Unfortunately it does mean making a previously-infallible method capable of panicing, although of course the existing impl remains infallible. The alternative would be a whole new `ExitStatusErrorExt` trait. `<ExitStatus as ExitStatusExt>::into_raw()` is not particularly ergonomic to call because of the often-required type annotation. See for example the code in the test case in library/std/src/sys/unix/process/process_unix/tests.rs Perhaps we should provide equivalent free functions for `ExitStatus` and `ExitStatusExt` in std::os::unix::process and maybe deprecate this trait method. But I think that is for the future. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for 60a4d96 - Browse repository at this point
Copy the full SHA 60a4d96View commit details -
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
Configuration menu - View commit details
-
Copy full SHA for 8832b0a - Browse repository at this point
Copy the full SHA 8832b0aView commit details -
ExitStatusError: Be more verbose in Display impl
Co-authored-by: Jane Lusby <jlusby@yaah.dev>
Configuration menu - View commit details
-
Copy full SHA for bb4ef68 - Browse repository at this point
Copy the full SHA bb4ef68View commit details -
impl crate::error::Error for ExitStatusError
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for 4687153 - Browse repository at this point
Copy the full SHA 4687153View commit details -
ExitStatusError: Remove mentions in stable docs
We should revert this commit when this is stabilised. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for 26c782b - Browse repository at this point
Copy the full SHA 26c782bView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.