diff options
| -rw-r--r-- | library/alloc/Cargo.toml | 2 | ||||
| -rw-r--r-- | tests/ui/macros/std-2024-macros.rs | 4 | ||||
| -rw-r--r-- | tests/ui/macros/std-2024-macros.stderr | 18 |
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 - |
