Change Termination::report return type to ExitCode by yaahc · Pull Request #93442 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation15 Commits2 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Related to #43301
The goal of this change is to minimize the forward compatibility risks in stabilizing Termination. By using the opaque type ExitCode
instead of an i32
we leave room for us to evolve the API over time to provide what cross-platform consistency we can / minimize footguns when working with exit codes, where as stabilizing on i32
would limit what changes we could make in the future in how we represent and construct exit codes.
(rust-highfive has picked a reviewer for you, use r? to override)
yaahc added T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
This comment has been minimized.
I will note that without even a PartialEq or is_success/is_failure methods, this makes the ExitCode basically useless outside unstable code modulo passing up to fn main
. That seems plausibly OK, but fairly weird for an API we would actually want to stabilize.
r=me with the one nit comment fixed and/or perf run to confirm no effects modulo it.
@bors rollup=never since regardless this'll probably perturb codegen for binaries a little.
Awesome, resolved the inlining issue. Going to add the partial_eq / is_success question to the ExitCode tracking issue as an unresolved question for now.
@bors r=Mark-Simulacrum rollup=never
📌 Commit 19db85d has been approved by Mark-Simulacrum
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
yaahc mentioned this pull request
1 task
bors mentioned this pull request
bors mentioned this pull request
Finished benchmarking commit (2681f25): comparison url.
Summary: This benchmark run did not return any relevant results.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.
@rustbot label: -perf-regression
yuhr mentioned this pull request
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request
Remove unnecessay .report() on ExitCode
Since rust-lang#93442, the return type is ExitCode
anyway so there's no need to do a conversion using .report()
(which is now just a no-op).
Labels
This PR was explicitly merged by bors.
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the library API team, which will review and decide on the PR/issue.