Rollup merge of #94461 - jhpratt:2024-edition, r=pnkfelix
Create (unstable) 2024 edition [On Zulip](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Deprecating.20macro.20scoping.20shenanigans/near/272860652), there was a small aside regarding creating the 2024 edition now as opposed to later. There was a reasonable amount of support and no stated opposition. This change creates the 2024 edition in the compiler and creates a prelude for the 2024 edition. There is no current difference between the 2021 and 2024 editions. Cargo and other tools will need to be updated separately, as it's not in the same repository. This change permits the vast majority of work towards the next edition to proceed _now_ instead of waiting until 2024. For sanity purposes, I've merged the "hello" UI tests into a single file with multiple revisions. Otherwise we'd end up with a file per edition, despite them being essentially identical. ````@rustbot```` label +T-lang +S-waiting-on-review Not sure on the relevant team, to be honest.
This commit is contained in:
commit
20bf34f8c5
14 changed files with 83 additions and 12 deletions
|
@ -45,3 +45,13 @@ pub mod rust_2021 {
|
|||
#[doc(no_inline)]
|
||||
pub use crate::convert::{TryFrom, TryInto};
|
||||
}
|
||||
|
||||
/// The 2024 edition of the core prelude.
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[unstable(feature = "prelude_2024", issue = "none")]
|
||||
pub mod rust_2024 {
|
||||
#[unstable(feature = "prelude_2024", issue = "none")]
|
||||
#[doc(no_inline)]
|
||||
pub use super::rust_2021::*;
|
||||
}
|
||||
|
|
|
@ -279,6 +279,7 @@
|
|||
#![feature(panic_info_message)]
|
||||
#![feature(panic_internals)]
|
||||
#![feature(portable_simd)]
|
||||
#![feature(prelude_2024)]
|
||||
#![feature(ptr_as_uninit)]
|
||||
#![feature(raw_os_nonzero)]
|
||||
#![feature(slice_internals)]
|
||||
|
|
|
@ -132,3 +132,17 @@ pub mod rust_2021 {
|
|||
#[doc(no_inline)]
|
||||
pub use core::prelude::rust_2021::*;
|
||||
}
|
||||
|
||||
/// The 2024 version of the prelude of The Rust Standard Library.
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[unstable(feature = "prelude_2024", issue = "none")]
|
||||
pub mod rust_2024 {
|
||||
#[unstable(feature = "prelude_2024", issue = "none")]
|
||||
#[doc(no_inline)]
|
||||
pub use super::v1::*;
|
||||
|
||||
#[unstable(feature = "prelude_2024", issue = "none")]
|
||||
#[doc(no_inline)]
|
||||
pub use core::prelude::rust_2024::*;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue