Move std::io::RawOsError to core::io#155574
Move std::io::RawOsError to core::io#155574bushrat011899 wants to merge 3 commits intorust-lang:mainfrom
std::io::RawOsError to core::io#155574Conversation
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 has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
lgtm |
|
@joboet, do you think we should replicate the sys/ structure in core for platform-specific things, following the convention in std (IIRC linted on by tidy at least to some extent as well). r? joboet r=me if we don't hear back in a week or so (can always change this later). |
|
|
|
It depends: having a separate |
For some added context, #152918 and #154684 have done a little scouting as to the extent of changes required. I believe the only other items which may need to be moved to core are |
|
Alright, let's move forward with this and revisit if we end up with much more than a few cfgs (and maybe even when those spread outside error). @bors r+ |
…, r=Mark-Simulacrum Move `std::io::RawOsError` to `core::io` ACP: rust-lang/libs-team#755 Tracking issue: rust-lang#154046 Related: rust-lang#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.
ACP: rust-lang/libs-team#755
Tracking issue: #154046
Related: #154654
Description
As a part of moving components of
std::iointoalloc::ioandcore::io, there will need to be a new home for the typeRawOsError. In this PR, I propose moving it tocore::io, and removing it fromstd::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 ontarget_osincore(e.g.,core::osandcore::ffi).Since
RawOsErroris 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 aroundisizeon all platforms).Notes