Skip to content

Move std::io::RawOsError to core::io#155574

Open
bushrat011899 wants to merge 3 commits intorust-lang:mainfrom
bushrat011899:core_io_raw_os_error
Open

Move std::io::RawOsError to core::io#155574
bushrat011899 wants to merge 3 commits intorust-lang:mainfrom
bushrat011899:core_io_raw_os_error

Conversation

@bushrat011899
Copy link
Copy Markdown
Contributor

ACP: rust-lang/libs-team#755
Tracking issue: #154046
Related: #154654

Description

As a part of moving components of std::io into alloc::io and core::io, there will need to be a new home for the type RawOsError. In this PR, I propose moving it to core::io, and removing it from std::sys. I suspect this will be quite controversial as it is a platform dependent type, but this is not the only instance of a type being conditioned on target_os in core (e.g., core::os and core::ffi).

Since RawOsError is currently unstable, I think it's reasonable to make this move now, and worry about making it platform independent if/when it is stabilized (e.g., replacing it with a wrapper around isize on all platforms).


Notes

  • No AI tooling of any kind was used during the creation of this PR.

The hyperlink to `std::io::Error` will not be valid when moved to `core::io`.
There is also a typo which I might as well fix while I'm here.
Inconsistently referenced through `std::sys` and `std::io`. Choosing `std::io` as the canonical source to make migration to `core::io` cleaner.
@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 Apr 20, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 20, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 7 candidates
  • Random selection from Mark-Simulacrum, jhpratt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants