@@ -91,6 +91,21 @@ LL | | }
9191LL | | }
9292 | |_- not a free function, impl method or static
9393
94+ error[E0517]: attribute should be applied to a struct, enum, or union
95+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:137:8
96+ |
97+ LL | #[repr(C)]
98+ | ^
99+ LL |
100+ LL | / mod repr {
101+ LL | |
102+ LL | | mod inner { #![repr(C)] }
103+ LL | |
104+ ... |
105+ LL | |
106+ LL | | }
107+ | |_- not a struct, enum, or union
108+
94109error: attribute should be applied to an `extern crate` item
95110 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:25:1
96111 |
@@ -235,7 +250,31 @@ error: attribute should be applied to a free function, impl method or static
235250LL | #[export_name = "2200"] fn bar() {}
236251 | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
237252
238- error: aborting due to 34 previous errors
253+ error[E0517]: attribute should be applied to a struct, enum, or union
254+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:141:25
255+ |
256+ LL | mod inner { #![repr(C)] }
257+ | --------------------^---- not a struct, enum, or union
258+
259+ error[E0517]: attribute should be applied to a struct, enum, or union
260+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:145:12
261+ |
262+ LL | #[repr(C)] fn f() { }
263+ | ^ ---------- not a struct, enum, or union
264+
265+ error[E0517]: attribute should be applied to a struct, enum, or union
266+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:151:12
267+ |
268+ LL | #[repr(C)] type T = S;
269+ | ^ ----------- not a struct, enum, or union
270+
271+ error[E0517]: attribute should be applied to a struct, enum, or union
272+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:155:12
273+ |
274+ LL | #[repr(C)] impl S { }
275+ | ^ ---------- not a struct, enum, or union
276+
277+ error: aborting due to 39 previous errors
239278
240- Some errors have detailed explanations: E0518, E0658.
241- For more information about an error, try `rustc --explain E0518 `.
279+ Some errors have detailed explanations: E0517, E0518, E0658.
280+ For more information about an error, try `rustc --explain E0517 `.
0 commit comments