Move all sys::ext modules to os#84200
Conversation
|
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
library/std/src/os/mod.rs
Outdated
There was a problem hiding this comment.
The stability attributes on these re-exports don't affect the stability of the exported items.
This comment has been minimized.
This comment has been minimized.
|
Not really sure about the error, building for |
It only works if the directory |
|
(You can add |
|
Oh I didn't know that could be done, thanks for the suggestion! |
m-ou-se
left a comment
There was a problem hiding this comment.
This took some time to review, mostly because the current code (before this change) is a bit hard to follow, which this PR nicely cleans up. Thanks for doing this!
I only have one question:
library/std/src/os/hermit/mod.rs
Outdated
There was a problem hiding this comment.
Oh good catch, that is separate change I was working on that should be excluded from this PR.
(I noticed that hermit currently exports its extensions as unix, even though it is not target_os = "unix" and only contains OsStringExt (which might be confusing for users expecting e.g. sys::os::unix::fs::FileExt). I spoke with someone working on Hermit about whether this was intentional; and he said that currently there is no way for hermit to fully replicate everything in os::unix and that the plan is to instead move to os::hermit.)
Fully agreed that the code was hard to follow, it took quite some time untangling it all. |
|
☔ The latest upstream changes (presumably #84411) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Rebased and resolved the merge conflicts |
|
@bors r+ rollup=iffy |
|
📌 Commit 76e03ac8fdc1b9840e0dc906f9d7c10b2a99bb8e has been approved by |
|
⌛ Testing commit 76e03ac8fdc1b9840e0dc906f9d7c10b2a99bb8e with merge 694f1b7949b1bb1edb51e84f939aac981ad85326... |
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
|
☔ The latest upstream changes (presumably #84842) made this pull request unmergeable. Please resolve the merge conflicts. |
…os::imp::unix::fs::PermissionsExt::from_mode` in Clippy
|
Thanks again :) @bors r+ |
|
📌 Commit 2173d8d has been approved by |
|
☀️ Test successful - checks-actions |
Move all `sys::ext` modules to `os` This PR moves all `sys::ext` modules to `os`, centralizing the location of all `os` code and simplifying the dependencies between `os` and `sys`. Because this also removes all uses `cfg_if!` on publicly exported items, where after rust-lang#81969 there were still a few left, this should properly work around rust-lang/rust-analyzer#6038. `@rustbot` label: +T-libs-impl
This PR moves all
sys::extmodules toos, centralizing the location of alloscode and simplifying the dependencies betweenosandsys.Because this also removes all uses
cfg_if!on publicly exported items, where after #81969 there were still a few left, this should properly work around rust-lang/rust-analyzer#6038.@rustbot label: +T-libs-impl