@@ -17,7 +17,7 @@ LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
17
17
| ++++++++++++++++++++++++++++++++++++++++++++
18
18
19
19
error[E0463]: can't find crate for `wloop`
20
- --> $DIR/malformed-attrs.rs:208 :1
20
+ --> $DIR/malformed-attrs.rs:210 :1
21
21
|
22
22
LL | extern crate wloop;
23
23
| ^^^^^^^^^^^^^^^^^^^ can't find crate
@@ -120,25 +120,25 @@ LL | #[proc_macro_attribute = 19]
120
120
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_attribute]`
121
121
122
122
error: malformed `proc_macro_derive` attribute input
123
- --> $DIR/malformed-attrs.rs:120 :1
123
+ --> $DIR/malformed-attrs.rs:122 :1
124
124
|
125
125
LL | #[proc_macro_derive]
126
126
| ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
127
127
128
128
error: malformed `rustc_layout_scalar_valid_range_start` attribute input
129
- --> $DIR/malformed-attrs.rs:125 :1
129
+ --> $DIR/malformed-attrs.rs:127 :1
130
130
|
131
131
LL | #[rustc_layout_scalar_valid_range_start]
132
132
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_layout_scalar_valid_range_start(value)]`
133
133
134
134
error: malformed `rustc_layout_scalar_valid_range_end` attribute input
135
- --> $DIR/malformed-attrs.rs:127 :1
135
+ --> $DIR/malformed-attrs.rs:129 :1
136
136
|
137
137
LL | #[rustc_layout_scalar_valid_range_end]
138
138
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_layout_scalar_valid_range_end(value)]`
139
139
140
140
error: malformed `must_not_suspend` attribute input
141
- --> $DIR/malformed-attrs.rs:129 :1
141
+ --> $DIR/malformed-attrs.rs:131 :1
142
142
|
143
143
LL | #[must_not_suspend()]
144
144
| ^^^^^^^^^^^^^^^^^^^^^
@@ -153,115 +153,115 @@ LL + #[must_not_suspend]
153
153
|
154
154
155
155
error: malformed `cfi_encoding` attribute input
156
- --> $DIR/malformed-attrs.rs:131 :1
156
+ --> $DIR/malformed-attrs.rs:133 :1
157
157
|
158
158
LL | #[cfi_encoding]
159
159
| ^^^^^^^^^^^^^^^ help: must be of the form: `#[cfi_encoding = "encoding"]`
160
160
161
161
error: malformed `type_const` attribute input
162
- --> $DIR/malformed-attrs.rs:140 :5
162
+ --> $DIR/malformed-attrs.rs:142 :5
163
163
|
164
164
LL | #[type_const = 1]
165
165
| ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[type_const]`
166
166
167
167
error: malformed `marker` attribute input
168
- --> $DIR/malformed-attrs.rs:152 :1
168
+ --> $DIR/malformed-attrs.rs:154 :1
169
169
|
170
170
LL | #[marker = 3]
171
171
| ^^^^^^^^^^^^^ help: must be of the form: `#[marker]`
172
172
173
173
error: malformed `fundamental` attribute input
174
- --> $DIR/malformed-attrs.rs:154 :1
174
+ --> $DIR/malformed-attrs.rs:156 :1
175
175
|
176
176
LL | #[fundamental()]
177
177
| ^^^^^^^^^^^^^^^^ help: must be of the form: `#[fundamental]`
178
178
179
179
error: malformed `ffi_pure` attribute input
180
- --> $DIR/malformed-attrs.rs:162 :5
180
+ --> $DIR/malformed-attrs.rs:164 :5
181
181
|
182
182
LL | #[unsafe(ffi_pure = 1)]
183
183
| ^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[ffi_pure]`
184
184
185
185
error: malformed `link_ordinal` attribute input
186
- --> $DIR/malformed-attrs.rs:164 :5
186
+ --> $DIR/malformed-attrs.rs:166 :5
187
187
|
188
188
LL | #[link_ordinal]
189
189
| ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_ordinal(ordinal)]`
190
190
191
191
error: malformed `ffi_const` attribute input
192
- --> $DIR/malformed-attrs.rs:168 :5
192
+ --> $DIR/malformed-attrs.rs:170 :5
193
193
|
194
194
LL | #[unsafe(ffi_const = 1)]
195
195
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[ffi_const]`
196
196
197
197
error: malformed `linkage` attribute input
198
- --> $DIR/malformed-attrs.rs:170 :5
198
+ --> $DIR/malformed-attrs.rs:172 :5
199
199
|
200
200
LL | #[linkage]
201
201
| ^^^^^^^^^^ help: must be of the form: `#[linkage = "external|internal|..."]`
202
202
203
203
error: malformed `allow` attribute input
204
- --> $DIR/malformed-attrs.rs:175 :1
204
+ --> $DIR/malformed-attrs.rs:177 :1
205
205
|
206
206
LL | #[allow]
207
207
| ^^^^^^^^ help: must be of the form: `#[allow(lint1, lint2, ..., /*opt*/ reason = "...")]`
208
208
209
209
error: malformed `expect` attribute input
210
- --> $DIR/malformed-attrs.rs:177 :1
210
+ --> $DIR/malformed-attrs.rs:179 :1
211
211
|
212
212
LL | #[expect]
213
213
| ^^^^^^^^^ help: must be of the form: `#[expect(lint1, lint2, ..., /*opt*/ reason = "...")]`
214
214
215
215
error: malformed `warn` attribute input
216
- --> $DIR/malformed-attrs.rs:179 :1
216
+ --> $DIR/malformed-attrs.rs:181 :1
217
217
|
218
218
LL | #[warn]
219
219
| ^^^^^^^ help: must be of the form: `#[warn(lint1, lint2, ..., /*opt*/ reason = "...")]`
220
220
221
221
error: malformed `deny` attribute input
222
- --> $DIR/malformed-attrs.rs:181 :1
222
+ --> $DIR/malformed-attrs.rs:183 :1
223
223
|
224
224
LL | #[deny]
225
225
| ^^^^^^^ help: must be of the form: `#[deny(lint1, lint2, ..., /*opt*/ reason = "...")]`
226
226
227
227
error: malformed `forbid` attribute input
228
- --> $DIR/malformed-attrs.rs:183 :1
228
+ --> $DIR/malformed-attrs.rs:185 :1
229
229
|
230
230
LL | #[forbid]
231
231
| ^^^^^^^^^ help: must be of the form: `#[forbid(lint1, lint2, ..., /*opt*/ reason = "...")]`
232
232
233
233
error: malformed `debugger_visualizer` attribute input
234
- --> $DIR/malformed-attrs.rs:185 :1
234
+ --> $DIR/malformed-attrs.rs:187 :1
235
235
|
236
236
LL | #[debugger_visualizer]
237
237
| ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[debugger_visualizer(natvis_file = "...", gdb_script_file = "...")]`
238
238
239
239
error: malformed `automatically_derived` attribute input
240
- --> $DIR/malformed-attrs.rs:188 :1
240
+ --> $DIR/malformed-attrs.rs:190 :1
241
241
|
242
242
LL | #[automatically_derived = 18]
243
243
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[automatically_derived]`
244
244
245
245
error: malformed `non_exhaustive` attribute input
246
- --> $DIR/malformed-attrs.rs:194 :1
246
+ --> $DIR/malformed-attrs.rs:196 :1
247
247
|
248
248
LL | #[non_exhaustive = 1]
249
249
| ^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[non_exhaustive]`
250
250
251
251
error: malformed `thread_local` attribute input
252
- --> $DIR/malformed-attrs.rs:200 :1
252
+ --> $DIR/malformed-attrs.rs:202 :1
253
253
|
254
254
LL | #[thread_local()]
255
255
| ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[thread_local]`
256
256
257
257
error: malformed `no_link` attribute input
258
- --> $DIR/malformed-attrs.rs:204 :1
258
+ --> $DIR/malformed-attrs.rs:206 :1
259
259
|
260
260
LL | #[no_link()]
261
261
| ^^^^^^^^^^^^ help: must be of the form: `#[no_link]`
262
262
263
263
error: malformed `macro_use` attribute input
264
- --> $DIR/malformed-attrs.rs:206 :1
264
+ --> $DIR/malformed-attrs.rs:208 :1
265
265
|
266
266
LL | #[macro_use = 1]
267
267
| ^^^^^^^^^^^^^^^^
@@ -276,7 +276,7 @@ LL + #[macro_use]
276
276
|
277
277
278
278
error: malformed `macro_export` attribute input
279
- --> $DIR/malformed-attrs.rs:211 :1
279
+ --> $DIR/malformed-attrs.rs:213 :1
280
280
|
281
281
LL | #[macro_export = 18]
282
282
| ^^^^^^^^^^^^^^^^^^^^
@@ -291,7 +291,7 @@ LL + #[macro_export]
291
291
|
292
292
293
293
error: malformed `allow_internal_unsafe` attribute input
294
- --> $DIR/malformed-attrs.rs:213 :1
294
+ --> $DIR/malformed-attrs.rs:215 :1
295
295
|
296
296
LL | #[allow_internal_unsafe = 1]
297
297
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[allow_internal_unsafe]`
@@ -309,13 +309,13 @@ LL | #[proc_macro_attribute = 19]
309
309
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
310
310
311
311
error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
312
- --> $DIR/malformed-attrs.rs:120 :1
312
+ --> $DIR/malformed-attrs.rs:122 :1
313
313
|
314
314
LL | #[proc_macro_derive]
315
315
| ^^^^^^^^^^^^^^^^^^^^
316
316
317
317
error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint
318
- --> $DIR/malformed-attrs.rs:213 :1
318
+ --> $DIR/malformed-attrs.rs:215 :1
319
319
|
320
320
LL | #[allow_internal_unsafe = 1]
321
321
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -361,7 +361,7 @@ LL | #[ignore()]
361
361
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
362
362
363
363
error: invalid argument
364
- --> $DIR/malformed-attrs.rs:185 :1
364
+ --> $DIR/malformed-attrs.rs:187 :1
365
365
|
366
366
LL | #[debugger_visualizer]
367
367
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -541,24 +541,41 @@ LL | #[link_name]
541
541
| expected this to be of the form `link_name = "..."`
542
542
| help: must be of the form: `#[link_name = "name"]`
543
543
544
+ error[E0539]: malformed `must_use` attribute input
545
+ --> $DIR/malformed-attrs.rs:118:1
546
+ |
547
+ LL | #[must_use = 1]
548
+ | ^^^^^^^^^^^^^-^
549
+ | |
550
+ | expected a string literal here
551
+ |
552
+ help: try changing it to one of the following valid forms of the attribute
553
+ |
554
+ LL - #[must_use = 1]
555
+ LL + #[must_use = "reason"]
556
+ |
557
+ LL - #[must_use = 1]
558
+ LL + #[must_use]
559
+ |
560
+
544
561
warning: `#[diagnostic::do_not_recommend]` does not expect any arguments
545
- --> $DIR/malformed-attrs.rs:146 :1
562
+ --> $DIR/malformed-attrs.rs:148 :1
546
563
|
547
564
LL | #[diagnostic::do_not_recommend()]
548
565
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
549
566
|
550
567
= note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default
551
568
552
569
warning: missing options for `on_unimplemented` attribute
553
- --> $DIR/malformed-attrs.rs:135 :1
570
+ --> $DIR/malformed-attrs.rs:137 :1
554
571
|
555
572
LL | #[diagnostic::on_unimplemented]
556
573
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
557
574
|
558
575
= help: at least one of the `message`, `note` and `label` options are expected
559
576
560
577
warning: malformed `on_unimplemented` attribute
561
- --> $DIR/malformed-attrs.rs:137 :1
578
+ --> $DIR/malformed-attrs.rs:139 :1
562
579
|
563
580
LL | #[diagnostic::on_unimplemented = 1]
564
581
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
@@ -585,7 +602,7 @@ LL | #[coroutine = 63] || {}
585
602
= note: expected unit type `()`
586
603
found coroutine `{coroutine@$DIR/malformed-attrs.rs:110:23: 110:25}`
587
604
588
- error: aborting due to 72 previous errors; 3 warnings emitted
605
+ error: aborting due to 73 previous errors; 3 warnings emitted
589
606
590
607
Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805.
591
608
For more information about an error, try `rustc --explain E0308`.
0 commit comments