File tree Expand file tree Collapse file tree 3 files changed +3
-21
lines changed Expand file tree Collapse file tree 3 files changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ repository = "https://github.com/rust-lang/rust.git"
8
8
description = " The Rust core allocation and collections library"
9
9
autotests = false
10
10
autobenches = false
11
- edition = " 2021 "
11
+ edition = " 2024 "
12
12
13
13
[lib ]
14
14
test = false
Original file line number Diff line number Diff line change 1
1
// Tests a small handful of macros in the standard library how they handle the
2
2
// new behavior introduced in 2024 that allows `const{}` expressions.
3
3
4
+ //@ check-pass
5
+
4
6
fn main ( ) {
5
7
assert_eq ! ( 0 , const { 0 } ) ;
6
8
assert_eq ! ( const { 0 } , const { 0 } ) ;
7
9
assert_eq ! ( const { 0 } , 0 ) ;
8
10
9
11
let _: Vec < Vec < String > > = vec ! [ const { vec![ ] } ] ;
10
- //~^ ERROR: no rules expected keyword `const`
11
12
let _: Vec < Vec < String > > = vec ! [ const { vec![ ] } ; 10 ] ;
12
- //~^ ERROR: no rules expected keyword `const`
13
13
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments