-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Change Termination::report return type to ExitCode #93442
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
These test failures are unrelated to the changes in this PR: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Spurious.20mir-opt.20segfaults.20GHA/near/269699225 |
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 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 |
☀️ Test successful - checks-actions |
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 |
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).
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 ani32
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 oni32
would limit what changes we could make in the future in how we represent and construct exit codes.