]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-block-non-item-statement.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-block-non-item-statement.rs
CommitLineData
29967ef6 1// check-pass
1a4d82fc 2
a7813a04
XL
3enum Foo {
4 Bar = { let x = 1; 3 }
a7813a04
XL
5}
6
0731742a
XL
7
8const A: usize = { 1; 2 };
9
10const B: usize = { { } 2 };
11
12macro_rules! foo {
13 () => (())
14}
15
16const C: usize = { foo!(); 2 };
17
18const D: usize = { let x = 4; 2 };
19
20type Array = [u32; { let x = 2; 5 }];
21type Array2 = [u32; { let mut x = 2; x = 3; x}];
22
8bb4bdeb 23pub fn main() {}