• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[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
3   |
4LL | #![rustc_main]
5   | ^^^^^^^^^^^^^^
6   |
7   = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
8
9error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
10  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:40:5
11   |
12LL |     #[inline = "2100"] fn f() { }
13   |     ^^^^^^^^^^^^^^^^^^
14   |
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
18
19error: `start` attribute can only be used on functions
20  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:119:1
21   |
22LL | #[start]
23   | ^^^^^^^^
24
25error: `start` attribute can only be used on functions
26  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:122:17
27   |
28LL |     mod inner { #![start] }
29   |                 ^^^^^^^^^
30
31error: `start` attribute can only be used on functions
32  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:127:5
33   |
34LL |     #[start] struct S;
35   |     ^^^^^^^^
36
37error: `start` attribute can only be used on functions
38  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:130:5
39   |
40LL |     #[start] type T = S;
41   |     ^^^^^^^^
42
43error: `start` attribute can only be used on functions
44  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:133:5
45   |
46LL |     #[start] impl S { }
47   |     ^^^^^^^^
48
49error[E0518]: attribute should be applied to function or closure
50  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:31:1
51   |
52LL |   #[inline]
53   |   ^^^^^^^^^
54LL |
55LL | / mod inline {
56LL | |
57LL | |
58LL | |     mod inner { #![inline] }
59...  |
60LL | |
61LL | | }
62   | |_- not a function or closure
63
64error: attribute should be applied to an `extern crate` item
65  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:59:1
66   |
67LL |   #[no_link]
68   |   ^^^^^^^^^^
69LL |
70LL | / mod no_link {
71LL | |
72LL | |
73LL | |     mod inner { #![no_link] }
74...  |
75LL | |
76LL | | }
77   | |_- not an `extern crate` item
78
79error: attribute should be applied to a free function, impl method or static
80  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:85:1
81   |
82LL |   #[export_name = "2200"]
83   |   ^^^^^^^^^^^^^^^^^^^^^^^
84LL |
85LL | / mod export_name {
86LL | |
87LL | |
88LL | |     mod inner { #![export_name="2200"] }
89...  |
90LL | |     }
91LL | | }
92   | |_- not a free function, impl method or static
93
94error[E0517]: attribute should be applied to a struct, enum, or union
95  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:137:8
96   |
97LL |   #[repr(C)]
98   |          ^
99LL |
100LL | / mod repr {
101LL | |
102LL | |     mod inner { #![repr(C)] }
103LL | |
104...  |
105LL | |
106LL | | }
107   | |_- not a struct, enum, or union
108
109error: attribute should be applied to an `extern crate` item
110  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:25:1
111   |
112LL | #![no_link]
113   | ^^^^^^^^^^^ not an `extern crate` item
114
115error: attribute should be applied to a free function, impl method or static
116  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:27:1
117   |
118LL | #![export_name = "2200"]
119   | ^^^^^^^^^^^^^^^^^^^^^^^^ not a free function, impl method or static
120
121error[E0518]: attribute should be applied to function or closure
122  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:29:1
123   |
124LL | #![inline]
125   | ^^^^^^^^^^ not a function or closure
126
127error: `macro_export` attribute cannot be used at crate level
128  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:12:1
129   |
130LL | #![macro_export]
131   | ^^^^^^^^^^^^^^^^
132   |
133help: perhaps you meant to use an outer attribute
134   |
135LL | #[macro_export]
136   |
137
138error: `rustc_main` attribute cannot be used at crate level
139  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:14:1
140   |
141LL | #![rustc_main]
142   | ^^^^^^^^^^^^^^
143   |
144help: perhaps you meant to use an outer attribute
145   |
146LL | #[rustc_main]
147   | ~~~~~~~~~~~~~
148
149error: `start` attribute cannot be used at crate level
150  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:16:1
151   |
152LL | #![start]
153   | ^^^^^^^^^
154   |
155help: perhaps you meant to use an outer attribute
156   |
157LL | #[start]
158   |
159
160error: `repr` attribute cannot be used at crate level
161  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:18:1
162   |
163LL | #![repr()]
164   | ^^^^^^^^^^
165   |
166help: perhaps you meant to use an outer attribute
167   |
168LL | #[repr()]
169   |
170
171error: `path` attribute cannot be used at crate level
172  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:20:1
173   |
174LL | #![path = "3800"]
175   | ^^^^^^^^^^^^^^^^^
176   |
177help: perhaps you meant to use an outer attribute
178   |
179LL | #[path = "3800"]
180   |
181
182error: `automatically_derived` attribute cannot be used at crate level
183  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:22:1
184   |
185LL | #![automatically_derived]
186   | ^^^^^^^^^^^^^^^^^^^^^^^^^
187   |
188help: perhaps you meant to use an outer attribute
189   |
190LL | #[automatically_derived]
191   |
192
193error[E0518]: attribute should be applied to function or closure
194  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:36:17
195   |
196LL |     mod inner { #![inline] }
197   |     ------------^^^^^^^^^^-- not a function or closure
198
199error[E0518]: attribute should be applied to function or closure
200  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
201   |
202LL |     #[inline] struct S;
203   |     ^^^^^^^^^ --------- not a function or closure
204
205error[E0518]: attribute should be applied to function or closure
206  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:50:5
207   |
208LL |     #[inline] type T = S;
209   |     ^^^^^^^^^ ----------- not a function or closure
210
211error[E0518]: attribute should be applied to function or closure
212  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:54:5
213   |
214LL |     #[inline] impl S { }
215   |     ^^^^^^^^^ ---------- not a function or closure
216
217error: attribute should be applied to an `extern crate` item
218  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:64:17
219   |
220LL |     mod inner { #![no_link] }
221   |     ------------^^^^^^^^^^^-- not an `extern crate` item
222
223error: attribute should be applied to an `extern crate` item
224  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:68:5
225   |
226LL |     #[no_link] fn f() { }
227   |     ^^^^^^^^^^ ---------- not an `extern crate` item
228
229error: attribute should be applied to an `extern crate` item
230  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:72:5
231   |
232LL |     #[no_link] struct S;
233   |     ^^^^^^^^^^ --------- not an `extern crate` item
234
235error: attribute should be applied to an `extern crate` item
236  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:76:5
237   |
238LL |     #[no_link]type T = S;
239   |     ^^^^^^^^^^----------- not an `extern crate` item
240
241error: attribute should be applied to an `extern crate` item
242  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:80:5
243   |
244LL |     #[no_link] impl S { }
245   |     ^^^^^^^^^^ ---------- not an `extern crate` item
246
247error: attribute should be applied to a free function, impl method or static
248  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:17
249   |
250LL |     mod inner { #![export_name="2200"] }
251   |     ------------^^^^^^^^^^^^^^^^^^^^^^-- not a free function, impl method or static
252
253error: attribute should be applied to a free function, impl method or static
254  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:5
255   |
256LL |     #[export_name = "2200"] struct S;
257   |     ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
258
259error: attribute should be applied to a free function, impl method or static
260  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:100:5
261   |
262LL |     #[export_name = "2200"] type T = S;
263   |     ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
264
265error: attribute should be applied to a free function, impl method or static
266  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:104:5
267   |
268LL |     #[export_name = "2200"] impl S { }
269   |     ^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a free function, impl method or static
270
271error: attribute should be applied to a free function, impl method or static
272  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:109:9
273   |
274LL |         #[export_name = "2200"] fn foo();
275   |         ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
276
277error: attribute should be applied to a free function, impl method or static
278  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:113:9
279   |
280LL |         #[export_name = "2200"] fn bar() {}
281   |         ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
282
283error[E0517]: attribute should be applied to a struct, enum, or union
284  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:141:25
285   |
286LL |     mod inner { #![repr(C)] }
287   |     --------------------^---- not a struct, enum, or union
288
289error[E0517]: attribute should be applied to a struct, enum, or union
290  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:145:12
291   |
292LL |     #[repr(C)] fn f() { }
293   |            ^   ---------- not a struct, enum, or union
294
295error[E0517]: attribute should be applied to a struct, enum, or union
296  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:151:12
297   |
298LL |     #[repr(C)] type T = S;
299   |            ^   ----------- not a struct, enum, or union
300
301error[E0517]: attribute should be applied to a struct, enum, or union
302  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:155:12
303   |
304LL |     #[repr(C)] impl S { }
305   |            ^   ---------- not a struct, enum, or union
306
307error: aborting due to 39 previous errors
308
309Some errors have detailed explanations: E0517, E0518, E0658.
310For more information about an error, try `rustc --explain E0517`.
311