fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
2.0 KiB72 linesraw
1error: malformed `repr` attribute input
2  --> $DIR/issue-43988.rs:24:5
3   |
4LL |     #[repr]
5   |     ^^^^^^^ help: must be of the form: `#[repr(C)]`
6
7error: malformed `repr` attribute input
8  --> $DIR/issue-43988.rs:35:14
9   |
10LL |     let _z = #[repr] 1;
11   |              ^^^^^^^ help: must be of the form: `#[repr(C)]`
12
13error[E0518]: attribute should be applied to function or closure
14  --> $DIR/issue-43988.rs:5:5
15   |
16LL |     #[inline]
17   |     ^^^^^^^^^
18LL |     let _a = 4;
19   |     ----------- not a function or closure
20
21error[E0518]: attribute should be applied to function or closure
22  --> $DIR/issue-43988.rs:10:5
23   |
24LL |     #[inline(XYZ)]
25   |     ^^^^^^^^^^^^^^
26LL |     let _b = 4;
27   |     ----------- not a function or closure
28
29error[E0517]: attribute should not be applied to a statement
30  --> $DIR/issue-43988.rs:14:5
31   |
32LL |     #[repr(nothing)]
33   |     ^^^^^^^^^^^^^^^^
34LL |     let _x = 0;
35   |     ----------- not a struct, enum, or union
36
37error[E0517]: attribute should not be applied to an expression
38  --> $DIR/issue-43988.rs:18:5
39   |
40LL |       #[repr(something_not_real)]
41   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
42LL | /     loop {
43LL | |         ()
44LL | |     };
45   | |_____- not defining a struct, enum, or union
46
47error[E0517]: attribute should not be applied to a statement
48  --> $DIR/issue-43988.rs:24:5
49   |
50LL |     #[repr]
51   |     ^^^^^^^
52LL |     let _y = "123";
53   |     --------------- not a struct, enum, or union
54
55error[E0518]: attribute should be applied to function or closure
56  --> $DIR/issue-43988.rs:31:5
57   |
58LL |     #[inline(ABC)]
59   |     ^^^^^^^^^^^^^^
60LL |     foo();
61   |     ----- not a function or closure
62
63error[E0517]: attribute should not be applied to an expression
64  --> $DIR/issue-43988.rs:35:14
65   |
66LL |     let _z = #[repr] 1;
67   |              ^^^^^^^ - not defining a struct, enum, or union
68
69error: aborting due to 9 previous errors
70
71Some errors have detailed explanations: E0517, E0518.
72For more information about an error, try `rustc --explain E0517`.