Skip to content

Commit 4eeadd4

Browse files
authored
Rollup merge of rust-lang#137606 - davidtwco:next-edition, r=traviscross,ehuss
add a "future" edition This idea has been discussed previously [on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/Continuous.20edition-like.20changes.3F/near/432559262) (though what I've implemented isn't exactly the "next"/"future" editions proposed in that message, just the "future" edition). I've found myself prototyping changes that involve edition migrations and wanting to target an upcoming edition for those migrations, but none exists. This should be permanently unstable and not removed.
2 parents d15d3f7 + fb4e1b8 commit 4eeadd4

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

Diff for: core/src/prelude/mod.rs

+23
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,26 @@ pub mod rust_2024 {
7070
#[doc(no_inline)]
7171
pub use crate::future::{Future, IntoFuture};
7272
}
73+
74+
/// The Future version of the core prelude.
75+
///
76+
/// See the [module-level documentation](self) for more.
77+
#[doc(hidden)]
78+
#[unstable(feature = "prelude_future", issue = "none")]
79+
pub mod rust_future {
80+
#[stable(feature = "rust1", since = "1.0.0")]
81+
#[doc(no_inline)]
82+
pub use super::v1::*;
83+
84+
#[stable(feature = "prelude_2021", since = "1.55.0")]
85+
#[doc(no_inline)]
86+
pub use crate::iter::FromIterator;
87+
88+
#[stable(feature = "prelude_2021", since = "1.55.0")]
89+
#[doc(no_inline)]
90+
pub use crate::convert::{TryFrom, TryInto};
91+
92+
#[stable(feature = "prelude_2024", since = "1.85.0")]
93+
#[doc(no_inline)]
94+
pub use crate::future::{Future, IntoFuture};
95+
}

Diff for: std/src/prelude/mod.rs

+15
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,18 @@ pub mod rust_2024 {
160160
#[doc(no_inline)]
161161
pub use core::prelude::rust_2024::*;
162162
}
163+
164+
/// The Future version of the prelude of The Rust Standard Library.
165+
///
166+
/// See the [module-level documentation](self) for more.
167+
#[doc(hidden)]
168+
#[unstable(feature = "prelude_future", issue = "none")]
169+
pub mod rust_future {
170+
#[stable(feature = "rust1", since = "1.0.0")]
171+
#[doc(no_inline)]
172+
pub use super::v1::*;
173+
174+
#[unstable(feature = "prelude_next", issue = "none")]
175+
#[doc(no_inline)]
176+
pub use core::prelude::rust_future::*;
177+
}

0 commit comments

Comments
 (0)