about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2025-02-11 15:20:06 -0800
committerEric Huss <eric@huss.org>2025-03-11 09:46:34 -0700
commitf505d4e8e380305e9c028c50e5e3a143d4635161 (patch)
tree36b7c94de5770147052382bc9050843ff230433d
parent0e071c2c6a585305c53b9d46cab81286a98eb94a (diff)
downloadrust-f505d4e8e380305e9c028c50e5e3a143d4635161.tar.gz
rust-f505d4e8e380305e9c028c50e5e3a143d4635161.zip
Migrate alloc to Rust 2024
-rw-r--r--library/alloc/Cargo.toml2
-rw-r--r--tests/ui/macros/std-2024-macros.rs4
-rw-r--r--tests/ui/macros/std-2024-macros.stderr18
3 files changed, 3 insertions, 21 deletions
diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml
index dbdf292433b..8d0253bd29a 100644
--- a/library/alloc/Cargo.toml
+++ b/library/alloc/Cargo.toml
@@ -8,7 +8,7 @@ repository = "https://github.com/rust-lang/rust.git"
 description = "The Rust core allocation and collections library"
 autotests = false
 autobenches = false
-edition = "2021"
+edition = "2024"
 
 [lib]
 test = false
diff --git a/tests/ui/macros/std-2024-macros.rs b/tests/ui/macros/std-2024-macros.rs
index d39b6a9811a..453c7ee16e5 100644
--- a/tests/ui/macros/std-2024-macros.rs
+++ b/tests/ui/macros/std-2024-macros.rs
@@ -1,13 +1,13 @@
 // Tests a small handful of macros in the standard library how they handle the
 // new behavior introduced in 2024 that allows `const{}` expressions.
 
+//@ check-pass
+
 fn main() {
     assert_eq!(0, const { 0 });
     assert_eq!(const { 0 }, const { 0 });
     assert_eq!(const { 0 }, 0);
 
     let _: Vec<Vec<String>> = vec![const { vec![] }];
-    //~^ ERROR: no rules expected keyword `const`
     let _: Vec<Vec<String>> = vec![const { vec![] }; 10];
-    //~^ ERROR: no rules expected keyword `const`
 }
diff --git a/tests/ui/macros/std-2024-macros.stderr b/tests/ui/macros/std-2024-macros.stderr
deleted file mode 100644
index 5395b6eac76..00000000000
--- a/tests/ui/macros/std-2024-macros.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error: no rules expected keyword `const`
-  --> $DIR/std-2024-macros.rs:9:36
-   |
-LL |     let _: Vec<Vec<String>> = vec![const { vec![] }];
-   |                                    ^^^^^ no rules expected this token in macro call
-   |
-   = note: while trying to match end of macro
-
-error: no rules expected keyword `const`
-  --> $DIR/std-2024-macros.rs:11:36
-   |
-LL |     let _: Vec<Vec<String>> = vec![const { vec![] }; 10];
-   |                                    ^^^^^ no rules expected this token in macro call
-   |
-   = note: while trying to match end of macro
-
-error: aborting due to 2 previous errors
-