]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-43988.rs
Remove "here" from "expected one of X here"
[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 attribute should not be applied to a statement
17
18     #[repr(something_not_real)]
19     loop {
20         ()
21     };
22     //~^^^^ ERROR attribute should not be applied to an expression
23
24     #[repr]
25     let _y = "123";
26     //~^^ ERROR attribute should not be applied to a statement
27     //~| ERROR malformed `repr` attribute
28
29     fn foo() {}
30
31     #[inline(ABC)]
32     foo();
33     //~^^ ERROR attribute should be applied to function or closure
34
35     let _z = #[repr] 1;
36     //~^ ERROR attribute should not be applied to an expression
37     //~| ERROR malformed `repr` attribute
38 }