Remove dead rustc_allowed_through_unstable_modules for std::os::fd contents#135491
Merged
bors merged 2 commits intorust-lang:masterfrom Jan 20, 2025
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As far as I was able to reconstruct, the history here is roughly as follows:
rustc_allowed_through_unstable_modulesto the types instd::os::fd::rawsince they were accessible on stable via the unstablestd::os::wasi::io::AsRawFdpath. (This was needed to fix Regression on nightly when compiling mio for wasm32-wasi #99502.)std::os::fdpublic. #98368 re-organized things so that instead of re-exporting from an internalstd::os::wasi::io::raw,std::os::wasi::io::AsRawFdis now directly re-exported fromstd::os::fd. This also madelibrary/std/src/os/wasi/io/raw.rsentirely dead code as far as I can tell, it's not imported by anything any more.std::os::wasi::io::AsFdetc. as stable. #103308 stabilizesstd::os::wasi::io, sorustc_allowed_through_unstable_modulesis not needed any more to accessstd::os::wasi::io::AsRawFd. There is even a comment inlibrary/std/src/os/wasi/io/raw.rssaying the attribute can be removed now, but that file is dead code so it is not touched as part of the stabilization.I did a grep for
pub use crate::os::fdand all the re-exports I could find are in stable modules. So given all that, we can remove therustc_allowed_through_unstable_modules(hoping they are not also re-exported somewhere else, it's really hard to be sure about this).I have checked that std still builds after this PR on the wasm32-wasip2 target.