Migrate alloc to Rust 2024
This commit is contained in:
parent
0e071c2c6a
commit
f505d4e8e3
3 changed files with 3 additions and 21 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue