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