]> git.proxmox.com Git - rustc.git/blob - tests/ui/issues/issue-43988.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / issues / issue-43988.rs
1 #![feature(stmt_expr_attributes)]
2
3 fn main() {
4
5 #[inline]
6 let _a = 4;
7 //~^^ ERROR attribute should be applied to function or closure
8
9
10 #[inline(XYZ)]
11 let _b = 4;
12 //~^^ ERROR attribute should be applied to function or closure
13
14 #[repr(nothing)]
15 let _x = 0;
16 //~^^ ERROR E0552
17
18 #[repr(something_not_real)]
19 loop {
20 ()
21 };
22 //~^^^^ ERROR E0552
23
24 #[repr]
25 let _y = "123";
26 //~^^ ERROR malformed `repr` attribute
27
28 fn foo() {}
29
30 #[inline(ABC)]
31 foo();
32 //~^^ ERROR attribute should be applied to function or closure
33
34 let _z = #[repr] 1;
35 //~^ ERROR malformed `repr` attribute
36 }