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 = note: `#[deny(ill_formed_attribute_input)]` on by default
16 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
17 = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
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: attribute should be applied to an `extern crate` item
95 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:25:1
100 error: attribute should be applied to a free function, impl method or static
101 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:27:1
103 LL | #![export_name = "2200"]
104 | ^^^^^^^^^^^^^^^^^^^^^^^^
106 error[E0518]: attribute should be applied to function or closure
107 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:29:1
112 error: `macro_export` attribute cannot be used at crate level
113 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:12:1
115 LL | #![macro_export]
118 error: `rustc_main` attribute cannot be used at crate level
119 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:14:1
124 error: `start` attribute cannot be used at crate level
125 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:16:1
130 error: `repr` attribute cannot be used at crate level
131 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:18:1
136 error: `path` attribute cannot be used at crate level
137 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:20:1
139 LL | #![path = "3800"]
142 error: `automatically_derived` attribute cannot be used at crate level
143 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:22:1
145 LL | #![automatically_derived]
146 | ^^^^^^^^^^^^^^^^^^^^^^^^^
148 error[E0518]: attribute should be applied to function or closure
149 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:36:17
151 LL | mod inner { #![inline] }
152 | ------------^^^^^^^^^^-- not a function or closure
154 error[E0518]: attribute should be applied to function or closure
155 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
157 LL | #[inline] struct S;
158 | ^^^^^^^^^ --------- not a function or closure
160 error[E0518]: attribute should be applied to function or closure
161 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:50:5
163 LL | #[inline] type T = S;
164 | ^^^^^^^^^ ----------- not a function or closure
166 error[E0518]: attribute should be applied to function or closure
167 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:54:5
169 LL | #[inline] impl S { }
170 | ^^^^^^^^^ ---------- not a function or closure
172 error: attribute should be applied to an `extern crate` item
173 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:64:17
175 LL | mod inner { #![no_link] }
176 | ------------^^^^^^^^^^^-- not an `extern crate` item
178 error: attribute should be applied to an `extern crate` item
179 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:68:5
181 LL | #[no_link] fn f() { }
182 | ^^^^^^^^^^ ---------- not an `extern crate` item
184 error: attribute should be applied to an `extern crate` item
185 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:72:5
187 LL | #[no_link] struct S;
188 | ^^^^^^^^^^ --------- not an `extern crate` item
190 error: attribute should be applied to an `extern crate` item
191 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:76:5
193 LL | #[no_link]type T = S;
194 | ^^^^^^^^^^----------- not an `extern crate` item
196 error: attribute should be applied to an `extern crate` item
197 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:80:5
199 LL | #[no_link] impl S { }
200 | ^^^^^^^^^^ ---------- not an `extern crate` item
202 error: attribute should be applied to a free function, impl method or static
203 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:17
205 LL | mod inner { #![export_name="2200"] }
206 | ------------^^^^^^^^^^^^^^^^^^^^^^-- not a free function, impl method or static
208 error: attribute should be applied to a free function, impl method or static
209 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:5
211 LL | #[export_name = "2200"] struct S;
212 | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
214 error: attribute should be applied to a free function, impl method or static
215 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:100:5
217 LL | #[export_name = "2200"] type T = S;
218 | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
220 error: attribute should be applied to a free function, impl method or static
221 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:104:5
223 LL | #[export_name = "2200"] impl S { }
224 | ^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a free function, impl method or static
226 error: attribute should be applied to a free function, impl method or static
227 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:109:9
229 LL | #[export_name = "2200"] fn foo();
230 | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
232 error: attribute should be applied to a free function, impl method or static
233 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:113:9
235 LL | #[export_name = "2200"] fn bar() {}
236 | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
238 error: aborting due to 34 previous errors
240 Some errors have detailed explanations: E0518, E0658.
241 For more information about an error, try `rustc --explain E0518`.