blob: 453c7ee16e5a6a1593b9eb1f90f9d92955d94232 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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![] }];
let _: Vec<Vec<String>> = vec![const { vec![] }; 10];
}
|