Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a525bde

Browse files
committed
Auto merge of rust-lang#138162 - ehuss:library-2024, r=<try>
Update the standard library to Rust 2024 This updates the standard library to Rust 2024. This includes the following notable changes: - Macros are updated to use new expression fragment specifiers. This PR includes a test to illustrate the changes, primarily allowing `const {...}` expressions now. - Some tests show a change in MIR drop order. We do not believe this will be an observable change ([see zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/268952-edition/topic/standard.20library.20migration/near/500972873)). Fixes rust-lang#133081 (Draft while I do some try jobs, as this is a high-risk of breakage.) try-job: aarch64-apple try-job: aarch64-gnu try-job: arm-android try-job: armhf-gnu try-job: dist-aarch64-apple try-job: dist-aarch64-linux try-job: dist-aarch64-msvc try-job: dist-android try-job: dist-apple-various try-job: dist-arm-linux try-job: dist-armhf-linux try-job: dist-armv7-linux try-job: dist-i586-gnu-i586-i686-musl try-job: dist-i686-linux try-job: dist-i686-mingw try-job: dist-i686-msvc try-job: dist-loongarch64-linux try-job: dist-loongarch64-musl try-job: dist-ohos try-job: dist-powerpc-linux
2 parents 59a9b9e + fab07c3 commit a525bde

File tree

23 files changed

+44
-31
lines changed

23 files changed

+44
-31
lines changed

compiler/rustc_codegen_cranelift/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ index 7165c3e48af..968552ad435 100644
1212
--- a/library/alloc/Cargo.toml
1313
+++ b/library/alloc/Cargo.toml
1414
@@ -11,7 +11,7 @@ test = { path = "../test" }
15-
edition = "2021"
15+
edition = "2024"
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }

library/alloc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repository = "https://github.com/rust-lang/rust.git"
88
description = "The Rust core allocation and collections library"
99
autotests = false
1010
autobenches = false
11-
edition = "2021"
11+
edition = "2024"
1212

1313
[dependencies]
1414
core = { path = "../core", public = true }

library/core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ autobenches = false
99
# If you update this, be sure to update it in a bunch of other places too!
1010
# As of 2024, it was src/tools/opt-dist, the core-no-fp-fmt-parse test and
1111
# the version of the prelude imported in core/lib.rs.
12-
edition = "2021"
12+
edition = "2024"
1313

1414
[lib]
1515
test = false

library/core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ extern crate self as core;
226226

227227
#[prelude_import]
228228
#[allow(unused)]
229-
use prelude::rust_2021::*;
229+
use prelude::rust_2024::*;
230230

231231
#[cfg(not(test))] // See #65860
232232
#[macro_use]

library/panic_abort/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.0.0"
44
license = "MIT OR Apache-2.0"
55
repository = "https://github.com/rust-lang/rust.git"
66
description = "Implementation of Rust panics via process aborts"
7-
edition = "2021"
7+
edition = "2024"
88

99
[lib]
1010
test = false

library/panic_unwind/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.0.0"
44
license = "MIT OR Apache-2.0"
55
repository = "https://github.com/rust-lang/rust.git"
66
description = "Implementation of Rust panics via stack unwinding"
7-
edition = "2021"
7+
edition = "2024"
88

99
[lib]
1010
test = false

library/proc_macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "proc_macro"
33
version = "0.0.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[dependencies]
77
std = { path = "../std" }

library/profiler_builtins/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "profiler_builtins"
33
version = "0.0.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[lib]
77
test = false

library/rustc-std-workspace-alloc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = 'MIT OR Apache-2.0'
55
description = """
66
Hack for the compiler's own build system
77
"""
8-
edition = "2021"
8+
edition = "2024"
99

1010
[lib]
1111
path = "lib.rs"

library/rustc-std-workspace-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = 'MIT OR Apache-2.0'
55
description = """
66
Hack for the compiler's own build system
77
"""
8-
edition = "2021"
8+
edition = "2024"
99

1010
[lib]
1111
path = "lib.rs"

0 commit comments

Comments
 (0)