]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-43988.rs
Rollup merge of #104059 - Rejyr:rustc_middle-lint-typo, r=petrochenkov
[rust.git] / src / test / 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 }