Skip to content

Commit 05b4ec8

Browse files
authored
Rollup merge of rust-lang#138162 - ehuss:library-2024, r=cuviper
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
2 parents 329b93b + b130747 commit 05b4ec8

File tree

23 files changed

+44
-31
lines changed

23 files changed

+44
-31
lines changed

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
[lib]
1414
test = false

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"

library/rustc-std-workspace-std/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)