diff --git a/library/core/src/io/mod.rs b/library/core/src/io/mod.rs index a44d271535a9e..37edf0a1082df 100644 --- a/library/core/src/io/mod.rs +++ b/library/core/src/io/mod.rs @@ -23,8 +23,6 @@ pub use self::error::const_error; #[unstable(feature = "core_io", issue = "154046")] pub use self::{ cursor::Cursor, - error::{Error, ErrorKind, Result}, - io_slice::{IoSlice, IoSliceMut}, seek::{Seek, SeekFrom}, util::{Chain, Empty, Repeat, Sink, Take, empty, repeat, sink}, write::Write, @@ -42,6 +40,11 @@ pub use self::{ util::{chain, take}, write::default_write_vectored, }; +#[stable(feature = "core_io_fundamentals", since = "CURRENT_RUSTC_VERSION")] +pub use self::{ + error::{Error, ErrorKind, Result}, + io_slice::{IoSlice, IoSliceMut}, +}; /// Marks that a type `T` can have IO traits such as [`Seek`], [`Write`], etc. automatically /// implemented for handle types like [`Arc`][arc] as well. diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 8a592fce7dfcd..63aa1f349e9dd 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -293,7 +293,7 @@ pub mod bstr; pub mod cell; pub mod char; pub mod ffi; -#[unstable(feature = "core_io", issue = "154046")] +#[stable(feature = "core_io_fundamentals", since = "CURRENT_RUSTC_VERSION")] pub mod io; pub mod iter; pub mod net; diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs index 35327264ccd77..1c19218f6df5c 100644 --- a/library/coretests/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -37,7 +37,6 @@ #![feature(const_unsigned_bigint_helpers)] #![feature(core_intrinsics)] #![feature(core_intrinsics_fallbacks)] -#![feature(core_io)] #![feature(core_io_borrowed_buf)] #![feature(core_private_bignum)] #![feature(core_private_diy_float)] diff --git a/tests/ui/feature-gates/feature-gate-io_error_kind_in_core.rs b/tests/ui/feature-gates/feature-gate-io_error_kind_in_core.rs deleted file mode 100644 index 514e4e1277afa..0000000000000 --- a/tests/ui/feature-gates/feature-gate-io_error_kind_in_core.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Ensure `ErrorKind` from `core` is gated behind `core_io` -//@ edition:2024 - -use std::io::ErrorKind as ErrorKindFromStd; - -use core::io::ErrorKind as ErrorKindFromCore; -//~^ ERROR use of unstable library feature `core_io` - -// Asserting both ErrorKinds are the same. -const _: [ErrorKindFromCore; 1] = [ErrorKindFromStd::Other]; - -fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-io_error_kind_in_core.stderr b/tests/ui/feature-gates/feature-gate-io_error_kind_in_core.stderr deleted file mode 100644 index edc316cc475e6..0000000000000 --- a/tests/ui/feature-gates/feature-gate-io_error_kind_in_core.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0658]: use of unstable library feature `core_io` - --> $DIR/feature-gate-io_error_kind_in_core.rs:6:11 - | -LL | use core::io::ErrorKind as ErrorKindFromCore; - | ^^ - | - = note: see issue #154046 for more information - = help: add `#![feature(core_io)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0658`.