2025-02-11 14:24:37 -08:00
|
|
|
// Tests a small handful of macros in the standard library how they handle the
|
|
|
|
|
// new behavior introduced in 2024 that allows `const{}` expressions.
|
|
|
|
|
|
2025-02-11 15:20:06 -08:00
|
|
|
//@ check-pass
|
|
|
|
|
|
2025-02-11 14:24:37 -08:00
|
|
|
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];
|
|
|
|
|
}
|