Skip to content

Commit

Permalink
Mark std::os::wasi::io::AsFd etc. as stable.
Browse files Browse the repository at this point in the history
io_safety was stabilized in Rust 1.63, so mark the io_safety exports in
`std::os::wasi::io` as stable.

Fixes rust-lang#103306.
  • Loading branch information
sunfishcode authored and Mark-Simulacrum committed Oct 29, 2022
1 parent a258a54 commit 002ce8c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
3 changes: 2 additions & 1 deletion library/std/src/os/wasi/io/fd.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//! Owned and borrowed file descriptors.

#![unstable(feature = "wasi_ext", issue = "71213")]
#![stable(feature = "io_safety_wasi", since = "1.65.0")]

// Tests for this module
#[cfg(test)]
mod tests;

#[stable(feature = "io_safety_wasi", since = "1.65.0")]
pub use crate::os::fd::owned::*;
6 changes: 3 additions & 3 deletions library/std/src/os/wasi/io/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//! WASI-specific extensions to general I/O primitives.

#![deny(unsafe_op_in_unsafe_fn)]
#![unstable(feature = "wasi_ext", issue = "71213")]
#![stable(feature = "io_safety_wasi", since = "1.65.0")]

mod fd;
mod raw;

#[unstable(feature = "wasi_ext", issue = "71213")]
#[stable(feature = "io_safety_wasi", since = "1.65.0")]
pub use fd::*;
#[unstable(feature = "wasi_ext", issue = "71213")]
#[stable(feature = "io_safety_wasi", since = "1.65.0")]
pub use raw::*;
18 changes: 2 additions & 16 deletions library/std/src/os/wasi/io/raw.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
//! WASI-specific extensions to general I/O primitives.

#![unstable(feature = "wasi_ext", issue = "71213")]
#![stable(feature = "io_safety_wasi", since = "1.65.0")]

// NOTE: despite the fact that this module is unstable,
// stable Rust had the capability to access the stable
// re-exported items from os::fd::raw through this
// unstable module.
// In PR #95956 the stability checker was changed to check
// all path segments of an item rather than just the last,
// which caused the aforementioned stable usage to regress
// (see issue #99502).
// As a result, the items in os::fd::raw were given the
// rustc_allowed_through_unstable_modules attribute.
// No regression tests were added to ensure this property,
// as CI is not configured to test wasm32-wasi.
// If this module is stabilized,
// you may want to remove those attributes
// (assuming no other unstable modules need them).
#[stable(feature = "io_safety_wasi", since = "1.65.0")]
pub use crate::os::fd::raw::*;

0 comments on commit 002ce8c

Please sign in to comment.