Skip to content

Commit 9d45690

Browse files
committed
Stabilize the Rust 2024 prelude
1 parent 5a6036a commit 9d45690

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

library/core/src/prelude/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub mod rust_2021 {
7171
/// The 2024 version of the core prelude.
7272
///
7373
/// See the [module-level documentation](self) for more.
74-
#[unstable(feature = "prelude_2024", issue = "121042")]
74+
#[stable(feature = "prelude_2024", since = "CURRENT_RUSTC_VERSION")]
7575
pub mod rust_2024 {
7676
#[stable(feature = "rust1", since = "1.0.0")]
7777
pub use super::common::*;
@@ -84,7 +84,7 @@ pub mod rust_2024 {
8484
#[doc(no_inline)]
8585
pub use crate::convert::{TryFrom, TryInto};
8686

87-
#[unstable(feature = "prelude_2024", issue = "121042")]
87+
#[stable(feature = "prelude_2024", since = "CURRENT_RUSTC_VERSION")]
8888
#[doc(no_inline)]
8989
pub use crate::future::{Future, IntoFuture};
9090
}

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@
348348
#![feature(pin_coerce_unsized_trait)]
349349
#![feature(pointer_is_aligned_to)]
350350
#![feature(portable_simd)]
351-
#![feature(prelude_2024)]
352351
#![feature(ptr_as_uninit)]
353352
#![feature(ptr_mask)]
354353
#![feature(random)]

library/std/src/prelude/mod.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
//!
2626
//! # Prelude contents
2727
//!
28+
//! The items included in the prelude depend on the edition of the crate.
2829
//! The first version of the prelude is used in Rust 2015 and Rust 2018,
2930
//! and lives in [`std::prelude::v1`].
3031
//! [`std::prelude::rust_2015`] and [`std::prelude::rust_2018`] re-export this prelude.
@@ -67,15 +68,21 @@
6768
//! The prelude used in Rust 2021, [`std::prelude::rust_2021`], includes all of the above,
6869
//! and in addition re-exports:
6970
//!
70-
//! * <code>[std::convert]::{[TryFrom], [TryInto]}</code>,
71+
//! * <code>[std::convert]::{[TryFrom], [TryInto]}</code>.
7172
//! * <code>[std::iter]::[FromIterator]</code>.
7273
//!
74+
//! The prelude used in Rust 2024, [`std::prelude::rust_2024`], includes all of the above,
75+
//! and in addition re-exports:
76+
//!
77+
//! * <code>[std::future]::{[Future], [IntoFuture]}</code>
78+
//!
7379
//! [std::borrow]: crate::borrow
7480
//! [std::boxed]: crate::boxed
7581
//! [std::clone]: crate::clone
7682
//! [std::cmp]: crate::cmp
7783
//! [std::convert]: crate::convert
7884
//! [std::default]: crate::default
85+
//! [std::future]: crate::future
7986
//! [std::iter]: crate::iter
8087
//! [std::marker]: crate::marker
8188
//! [std::mem]: crate::mem
@@ -85,6 +92,7 @@
8592
//! [`std::prelude::rust_2015`]: rust_2015
8693
//! [`std::prelude::rust_2018`]: rust_2018
8794
//! [`std::prelude::rust_2021`]: rust_2021
95+
//! [`std::prelude::rust_2024`]: rust_2024
8896
//! [std::result]: crate::result
8997
//! [std::slice]: crate::slice
9098
//! [std::string]: crate::string
@@ -94,6 +102,8 @@
94102
//! [book-dtor]: ../../book/ch15-03-drop.html
95103
//! [book-enums]: ../../book/ch06-01-defining-an-enum.html
96104
//! [book-iter]: ../../book/ch13-02-iterators.html
105+
//! [Future]: crate::future::Future
106+
//! [IntoFuture]: crate::future::IntoFuture
97107
98108
// No formatting: this file is nothing but re-exports, and their order is worth preserving.
99109
#![cfg_attr(rustfmt, rustfmt::skip)]
@@ -158,12 +168,12 @@ pub mod rust_2021 {
158168
/// The 2024 version of the prelude of The Rust Standard Library.
159169
///
160170
/// See the [module-level documentation](self) for more.
161-
#[unstable(feature = "prelude_2024", issue = "121042")]
171+
#[stable(feature = "prelude_2024", since = "CURRENT_RUSTC_VERSION")]
162172
pub mod rust_2024 {
163173
#[stable(feature = "rust1", since = "1.0.0")]
164174
pub use super::common::*;
165175

166-
#[unstable(feature = "prelude_2024", issue = "121042")]
176+
#[stable(feature = "prelude_2024", since = "CURRENT_RUSTC_VERSION")]
167177
#[doc(no_inline)]
168178
pub use core::prelude::rust_2024::*;
169179
}

0 commit comments

Comments
 (0)