1 error[E0658]: the `#[rustc_main]` attribute is used internally to specify test entry point function
2 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:14:1
7 = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
9 error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
10 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:40:5
12 LL | #[inline = "2100"] fn f() { }
15 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
16 = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
17 = note: `#[deny(ill_formed_attribute_input)]` on by default
19 error: `start` attribute can only be used on functions
20 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:119:1
25 error: `start` attribute can only be used on functions
26 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:122:17
28 LL | mod inner { #![start] }
31 error: `start` attribute can only be used on functions
32 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:127:5
34 LL | #[start] struct S;
37 error: `start` attribute can only be used on functions
38 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:130:5
40 LL | #[start] type T = S;
43 error: `start` attribute can only be used on functions
44 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:133:5
46 LL | #[start] impl S { }
49 error[E0518]: attribute should be applied to function or closure
50 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:31:1
58 LL | | mod inner { #![inline] }
62 | |_- not a function or closure
64 error: attribute should be applied to an `extern crate` item
65 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:59:1
73 LL | | mod inner { #![no_link] }
77 | |_- not an `extern crate` item
79 error: attribute should be applied to a free function, impl method or static
80 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:85:1
82 LL | #[export_name = "2200"]
83 | ^^^^^^^^^^^^^^^^^^^^^^^
85 LL | / mod export_name {
88 LL | | mod inner { #![export_name="2200"] }
92 | |_- not a free function, impl method or static
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
102 LL | | mod inner { #![repr(C)] }
107 | |_- not a struct, enum, or union
109 error: attribute should be applied to an `extern crate` item
110 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:25:1
115 error: attribute should be applied to a free function, impl method or static
116 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:27:1
118 LL | #![export_name = "2200"]
119 | ^^^^^^^^^^^^^^^^^^^^^^^^
121 error[E0518]: attribute should be applied to function or closure
122 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:29:1
127 error: `macro_export` attribute cannot be used at crate level
128 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:12:1
130 LL | #![macro_export]
133 help: perhaps you meant to use an outer attribute
138 error: `rustc_main` attribute cannot be used at crate level
139 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:14:1
144 help: perhaps you meant to use an outer attribute
149 error: `start` attribute cannot be used at crate level
150 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:16:1
155 help: perhaps you meant to use an outer attribute
160 error: `repr` attribute cannot be used at crate level
161 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:18:1
166 help: perhaps you meant to use an outer attribute
171 error: `path` attribute cannot be used at crate level
172 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:20:1
174 LL | #![path = "3800"]
177 help: perhaps you meant to use an outer attribute
179 LL | #[path = "3800"]
182 error: `automatically_derived` attribute cannot be used at crate level
183 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:22:1
185 LL | #![automatically_derived]
186 | ^^^^^^^^^^^^^^^^^^^^^^^^^
188 help: perhaps you meant to use an outer attribute
190 LL | #[automatically_derived]
193 error[E0518]: attribute should be applied to function or closure
194 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:36:17
196 LL | mod inner { #![inline] }
197 | ------------^^^^^^^^^^-- not a function or closure
199 error[E0518]: attribute should be applied to function or closure
200 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
202 LL | #[inline] struct S;
203 | ^^^^^^^^^ --------- not a function or closure
205 error[E0518]: attribute should be applied to function or closure
206 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:50:5
208 LL | #[inline] type T = S;
209 | ^^^^^^^^^ ----------- not a function or closure
211 error[E0518]: attribute should be applied to function or closure
212 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:54:5
214 LL | #[inline] impl S { }
215 | ^^^^^^^^^ ---------- not a function or closure
217 error: attribute should be applied to an `extern crate` item
218 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:64:17
220 LL | mod inner { #![no_link] }
221 | ------------^^^^^^^^^^^-- not an `extern crate` item
223 error: attribute should be applied to an `extern crate` item
224 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:68:5
226 LL | #[no_link] fn f() { }
227 | ^^^^^^^^^^ ---------- not an `extern crate` item
229 error: attribute should be applied to an `extern crate` item
230 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:72:5
232 LL | #[no_link] struct S;
233 | ^^^^^^^^^^ --------- not an `extern crate` item
235 error: attribute should be applied to an `extern crate` item
236 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:76:5
238 LL | #[no_link]type T = S;
239 | ^^^^^^^^^^----------- not an `extern crate` item
241 error: attribute should be applied to an `extern crate` item
242 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:80:5
244 LL | #[no_link] impl S { }
245 | ^^^^^^^^^^ ---------- not an `extern crate` item
247 error: attribute should be applied to a free function, impl method or static
248 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:17
250 LL | mod inner { #![export_name="2200"] }
251 | ------------^^^^^^^^^^^^^^^^^^^^^^-- not a free function, impl method or static
253 error: attribute should be applied to a free function, impl method or static
254 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:5
256 LL | #[export_name = "2200"] struct S;
257 | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
259 error: attribute should be applied to a free function, impl method or static
260 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:100:5
262 LL | #[export_name = "2200"] type T = S;
263 | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
265 error: attribute should be applied to a free function, impl method or static
266 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:104:5
268 LL | #[export_name = "2200"] impl S { }
269 | ^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a free function, impl method or static
271 error: attribute should be applied to a free function, impl method or static
272 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:109:9
274 LL | #[export_name = "2200"] fn foo();
275 | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
277 error: attribute should be applied to a free function, impl method or static
278 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:113:9
280 LL | #[export_name = "2200"] fn bar() {}
281 | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
283 error[E0517]: attribute should be applied to a struct, enum, or union
284 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:141:25
286 LL | mod inner { #![repr(C)] }
287 | --------------------^---- not a struct, enum, or union
289 error[E0517]: attribute should be applied to a struct, enum, or union
290 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:145:12
292 LL | #[repr(C)] fn f() { }
293 | ^ ---------- not a struct, enum, or union
295 error[E0517]: attribute should be applied to a struct, enum, or union
296 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:151:12
298 LL | #[repr(C)] type T = S;
299 | ^ ----------- not a struct, enum, or union
301 error[E0517]: attribute should be applied to a struct, enum, or union
302 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:155:12
304 LL | #[repr(C)] impl S { }
305 | ^ ---------- not a struct, enum, or union
307 error: aborting due to 39 previous errors
309 Some errors have detailed explanations: E0517, E0518, E0658.
310 For more information about an error, try `rustc --explain E0517`.