1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
|
error[E0658]: use of an internal attribute
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:12:1
|
LL | #![rustc_main]
| ^^^^^^^^^^^^^^
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
= note: the `#[rustc_main]` attribute is an internal implementation detail that will never be stable
= note: the `#[rustc_main]` attribute is used internally to specify test entry point function
error: `#[path]` attribute cannot be used on crates
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:19:1
|
LL | #![path = "3800"]
| ^^^^^^^^^^^^^^^^^
|
= help: `#[path]` can only be applied to modules
error: `#[automatically_derived]` attribute cannot be used on crates
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:21:1
|
LL | #![automatically_derived]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[automatically_derived]` can only be applied to trait impl blocks
error: `#[export_name]` attribute cannot be used on crates
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:26:1
|
LL | #![export_name = "2200"]
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[export_name]` can be applied to functions and statics
error: `#[inline]` attribute cannot be used on crates
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:28:1
|
LL | #![inline]
| ^^^^^^^^^^
|
= help: `#[inline]` can only be applied to functions
error: `#[inline]` attribute cannot be used on modules
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:30:1
|
LL | #[inline]
| ^^^^^^^^^
|
= help: `#[inline]` can only be applied to functions
error: `#[inline]` attribute cannot be used on modules
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:37:17
|
LL | mod inner { #![inline] }
| ^^^^^^^^^^
|
= help: `#[inline]` can only be applied to functions
error: `#[inline]` attribute cannot be used on structs
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
|
LL | #[inline] struct S;
| ^^^^^^^^^
|
= help: `#[inline]` can only be applied to functions
error: `#[inline]` attribute cannot be used on type aliases
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:49:5
|
LL | #[inline] type T = S;
| ^^^^^^^^^
|
= help: `#[inline]` can only be applied to functions
error: `#[inline]` attribute cannot be used on inherent impl blocks
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:52:5
|
LL | #[inline] impl S { }
| ^^^^^^^^^
|
= help: `#[inline]` can only be applied to functions
error: `#[export_name]` attribute cannot be used on modules
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:82:1
|
LL | #[export_name = "2200"]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[export_name]` can be applied to functions and statics
error: `#[export_name]` attribute cannot be used on modules
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:85:17
|
LL | mod inner { #![export_name="2200"] }
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[export_name]` can be applied to functions and statics
error: `#[export_name]` attribute cannot be used on structs
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:5
|
LL | #[export_name = "2200"] struct S;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[export_name]` can be applied to functions and statics
error: `#[export_name]` attribute cannot be used on type aliases
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:93:5
|
LL | #[export_name = "2200"] type T = S;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[export_name]` can be applied to functions and statics
error: `#[export_name]` attribute cannot be used on inherent impl blocks
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:5
|
LL | #[export_name = "2200"] impl S { }
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[export_name]` can be applied to functions and statics
error: `#[export_name]` attribute cannot be used on required trait methods
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:100:9
|
LL | #[export_name = "2200"] fn foo();
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[export_name]` can be applied to statics, functions, inherent methods, provided trait methods, and trait methods in impl blocks
error: attribute should be applied to an `extern crate` item
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:56:1
|
LL | #[no_link]
| ^^^^^^^^^^
LL |
LL | / mod no_link {
LL | |
LL | |
LL | | mod inner { #![no_link] }
... |
LL | | }
| |_- not an `extern crate` item
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:107:8
|
LL | #[repr(C)]
| ^
LL |
LL | / mod repr {
LL | |
LL | | mod inner { #![repr(C)] }
... |
LL | | }
| |_- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:131:8
|
LL | #[repr(Rust)]
| ^^^^
LL |
LL | / mod repr_rust {
LL | |
LL | | mod inner { #![repr(Rust)] }
... |
LL | | }
| |_- not a struct, enum, or union
error: attribute should be applied to an `extern crate` item
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:24:1
|
LL | #![no_link]
| ^^^^^^^^^^^ not an `extern crate` item
error: `macro_export` attribute cannot be used at crate level
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:10:1
|
LL | #![macro_export]
| ^^^^^^^^^^^^^^^^
...
LL | mod inline {
| ------ the inner attribute doesn't annotate this module
|
help: perhaps you meant to use an outer attribute
|
LL - #![macro_export]
LL + #[macro_export]
|
error: `rustc_main` attribute cannot be used at crate level
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:12:1
|
LL | #![rustc_main]
| ^^^^^^^^^^^^^^
...
LL | mod inline {
| ------ the inner attribute doesn't annotate this module
|
help: perhaps you meant to use an outer attribute
|
LL - #![rustc_main]
LL + #[rustc_main]
|
error: `repr` attribute cannot be used at crate level
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:17:1
|
LL | #![repr()]
| ^^^^^^^^^^
...
LL | mod inline {
| ------ the inner attribute doesn't annotate this module
|
help: perhaps you meant to use an outer attribute
|
LL - #![repr()]
LL + #[repr()]
|
error: attribute should be applied to an `extern crate` item
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:61:17
|
LL | mod inner { #![no_link] }
| ------------^^^^^^^^^^^-- not an `extern crate` item
error: attribute should be applied to an `extern crate` item
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:65:5
|
LL | #[no_link] fn f() { }
| ^^^^^^^^^^ ---------- not an `extern crate` item
error: attribute should be applied to an `extern crate` item
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:69:5
|
LL | #[no_link] struct S;
| ^^^^^^^^^^ --------- not an `extern crate` item
error: attribute should be applied to an `extern crate` item
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:73:5
|
LL | #[no_link]type T = S;
| ^^^^^^^^^^----------- not an `extern crate` item
error: attribute should be applied to an `extern crate` item
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:77:5
|
LL | #[no_link] impl S { }
| ^^^^^^^^^^ ---------- not an `extern crate` item
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:111:25
|
LL | mod inner { #![repr(C)] }
| --------------------^---- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:115:12
|
LL | #[repr(C)] fn f() { }
| ^ ---------- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:121:12
|
LL | #[repr(C)] type T = S;
| ^ ----------- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:125:12
|
LL | #[repr(C)] impl S { }
| ^ ---------- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:135:25
|
LL | mod inner { #![repr(Rust)] }
| --------------------^^^^---- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:139:12
|
LL | #[repr(Rust)] fn f() { }
| ^^^^ ---------- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:145:12
|
LL | #[repr(Rust)] type T = S;
| ^^^^ ----------- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:149:12
|
LL | #[repr(Rust)] impl S { }
| ^^^^ ---------- not a struct, enum, or union
error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:40:5
|
LL | #[inline = "2100"] fn f() { }
| ^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default
error: aborting due to 37 previous errors
Some errors have detailed explanations: E0517, E0658.
For more information about an error, try `rustc --explain E0517`.
Future incompatibility report: Future breakage diagnostic:
error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:40:5
|
LL | #[inline = "2100"] fn f() { }
| ^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default
|