Skip to content

Conversation

@thaliaarchi
Copy link
Contributor

Replace usages of io::Error::new(io::ErrorKind::Variant, "constant string") with io::const_error!(io::ErrorKind::Variant, "constant string") to avoid allocations when possible. Additionally, fix &&str error messages in SGX and missing/misplaced trailing commas in const_error!.

@rustbot
Copy link
Collaborator

rustbot commented Feb 11, 2025

r? @ChrisDenton

rustbot has assigned @ChrisDenton.
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 O-hermit Operating System: Hermit O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows 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 Feb 11, 2025
@thaliaarchi
Copy link
Contributor Author

thaliaarchi commented Feb 11, 2025

I have checked a target for each of the platforms modified:

x check library/std --target=x86_64-unknown-hermit
x check library/std --target=aarch64-kmc-solid_asp3
x check library/std --target=aarch64-unknown-teeos
x check library/std --target=x86_64-unknown-uefi
x check library/std --target=x86_64-unknown-linux-gnu
x check library/std --target=wasm32-wasip1
x check library/std --target=x86_64-pc-windows-gnu
x check library/std --target=riscv32imac-unknown-xous-elf
x check library/test

Note that TEEOS currently fails to build. I fixed that separately in #136769 commit Fix unsafe_op_in_unsafe_fn for TEEOS.

Copy link
Member

@ChrisDenton ChrisDenton left a comment

Choose a reason for hiding this comment

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

Thanks!

@ChrisDenton
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Feb 16, 2025

📌 Commit 9e390b2 has been approved by ChrisDenton

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 Feb 16, 2025
@bors bors merged commit c04801d into rust-lang:master Feb 17, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 17, 2025
@thaliaarchi thaliaarchi deleted the const-io-error branch February 17, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-hermit Operating System: Hermit O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows 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.

4 participants