Skip to content
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

pal::unsupported::process::ExitCode: use an u8 instead of a bool #130554

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

ShE3py
Copy link
Contributor

@ShE3py ShE3py commented Sep 19, 2024

ExitCode should “represents the status code the current process can return to its parent under normal termination”, but is currently represented as a bool on unsupported platforms, making the impl From<u8> for ExitCode lossy.

Fixes #130532.

History: IRLO thread (ExitCode as a main return), #48618 (initial impl), #93445 (From<u8> impl).

@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2024

r? @Noratrieb

rustbot has assigned @Noratrieb.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 19, 2024
Copy link
Member

@Noratrieb Noratrieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, thats great

@Noratrieb
Copy link
Member

@bors r+ rollupo

@bors
Copy link
Contributor

bors commented Sep 19, 2024

📌 Commit dc628c8 has been approved by Noratrieb

It is now in the queue for this repository.

@bors 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2024
@Noratrieb
Copy link
Member

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#128001 (Improve documentation for <integer>::from_str_radix)
 - rust-lang#130553 ([Clippy] Get rid of most `std` `match_def_path` usage, swap to diagnostic items.)
 - rust-lang#130554 (`pal::unsupported::process::ExitCode`: use an `u8` instead of a `bool`)
 - rust-lang#130556 (Mark the `link_cfg` feature as internal)
 - rust-lang#130558 (Support 128-bit atomics on s390x)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 553c20c into rust-lang:master Sep 19, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2024
Rollup merge of rust-lang#130554 - ShE3py:unsupported-exitcode, r=Noratrieb

`pal::unsupported::process::ExitCode`: use an `u8` instead of a `bool`

`ExitCode` should “represents the status code the current process can return to its parent under normal termination”, but is currently represented as a `bool` on unsupported platforms, making the `impl From<u8> for ExitCode` lossy.

Fixes rust-lang#130532.

History: [IRLO thread](https://internals.rust-lang.org/t/mini-pre-rfc-redesigning-process-exitstatus/5426) (`ExitCode` as a `main` return), rust-lang#48618 (initial impl), rust-lang#93445 (`From<u8>` impl).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected exit code with std::process::ExitCode when compiling wasm32-wasip1
4 participants