@@ -17,7 +17,7 @@ LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
1717 | ++++++++++++++++++++++++++++++++++++++++++++
1818
1919error[E0463]: can't find crate for `wloop`
20- --> $DIR/malformed-attrs.rs:208 :1
20+ --> $DIR/malformed-attrs.rs:210 :1
2121 |
2222LL | extern crate wloop;
2323 | ^^^^^^^^^^^^^^^^^^^ can't find crate
@@ -126,25 +126,25 @@ LL | #[proc_macro_attribute = 19]
126126 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_attribute]`
127127
128128error: malformed `proc_macro_derive` attribute input
129- --> $DIR/malformed-attrs.rs:120 :1
129+ --> $DIR/malformed-attrs.rs:122 :1
130130 |
131131LL | #[proc_macro_derive]
132132 | ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
133133
134134error: malformed `rustc_layout_scalar_valid_range_start` attribute input
135- --> $DIR/malformed-attrs.rs:125 :1
135+ --> $DIR/malformed-attrs.rs:127 :1
136136 |
137137LL | #[rustc_layout_scalar_valid_range_start]
138138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_layout_scalar_valid_range_start(value)]`
139139
140140error: malformed `rustc_layout_scalar_valid_range_end` attribute input
141- --> $DIR/malformed-attrs.rs:127 :1
141+ --> $DIR/malformed-attrs.rs:129 :1
142142 |
143143LL | #[rustc_layout_scalar_valid_range_end]
144144 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_layout_scalar_valid_range_end(value)]`
145145
146146error: malformed `must_not_suspend` attribute input
147- --> $DIR/malformed-attrs.rs:129 :1
147+ --> $DIR/malformed-attrs.rs:131 :1
148148 |
149149LL | #[must_not_suspend()]
150150 | ^^^^^^^^^^^^^^^^^^^^^
@@ -159,115 +159,115 @@ LL + #[must_not_suspend]
159159 |
160160
161161error: malformed `cfi_encoding` attribute input
162- --> $DIR/malformed-attrs.rs:131 :1
162+ --> $DIR/malformed-attrs.rs:133 :1
163163 |
164164LL | #[cfi_encoding]
165165 | ^^^^^^^^^^^^^^^ help: must be of the form: `#[cfi_encoding = "encoding"]`
166166
167167error: malformed `type_const` attribute input
168- --> $DIR/malformed-attrs.rs:140 :5
168+ --> $DIR/malformed-attrs.rs:142 :5
169169 |
170170LL | #[type_const = 1]
171171 | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[type_const]`
172172
173173error: malformed `marker` attribute input
174- --> $DIR/malformed-attrs.rs:152 :1
174+ --> $DIR/malformed-attrs.rs:154 :1
175175 |
176176LL | #[marker = 3]
177177 | ^^^^^^^^^^^^^ help: must be of the form: `#[marker]`
178178
179179error: malformed `fundamental` attribute input
180- --> $DIR/malformed-attrs.rs:154 :1
180+ --> $DIR/malformed-attrs.rs:156 :1
181181 |
182182LL | #[fundamental()]
183183 | ^^^^^^^^^^^^^^^^ help: must be of the form: `#[fundamental]`
184184
185185error: malformed `ffi_pure` attribute input
186- --> $DIR/malformed-attrs.rs:162 :5
186+ --> $DIR/malformed-attrs.rs:164 :5
187187 |
188188LL | #[unsafe(ffi_pure = 1)]
189189 | ^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[ffi_pure]`
190190
191191error: malformed `link_ordinal` attribute input
192- --> $DIR/malformed-attrs.rs:164 :5
192+ --> $DIR/malformed-attrs.rs:166 :5
193193 |
194194LL | #[link_ordinal]
195195 | ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_ordinal(ordinal)]`
196196
197197error: malformed `ffi_const` attribute input
198- --> $DIR/malformed-attrs.rs:168 :5
198+ --> $DIR/malformed-attrs.rs:170 :5
199199 |
200200LL | #[unsafe(ffi_const = 1)]
201201 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[ffi_const]`
202202
203203error: malformed `linkage` attribute input
204- --> $DIR/malformed-attrs.rs:170 :5
204+ --> $DIR/malformed-attrs.rs:172 :5
205205 |
206206LL | #[linkage]
207207 | ^^^^^^^^^^ help: must be of the form: `#[linkage = "external|internal|..."]`
208208
209209error: malformed `allow` attribute input
210- --> $DIR/malformed-attrs.rs:175 :1
210+ --> $DIR/malformed-attrs.rs:177 :1
211211 |
212212LL | #[allow]
213213 | ^^^^^^^^ help: must be of the form: `#[allow(lint1, lint2, ..., /*opt*/ reason = "...")]`
214214
215215error: malformed `expect` attribute input
216- --> $DIR/malformed-attrs.rs:177 :1
216+ --> $DIR/malformed-attrs.rs:179 :1
217217 |
218218LL | #[expect]
219219 | ^^^^^^^^^ help: must be of the form: `#[expect(lint1, lint2, ..., /*opt*/ reason = "...")]`
220220
221221error: malformed `warn` attribute input
222- --> $DIR/malformed-attrs.rs:179 :1
222+ --> $DIR/malformed-attrs.rs:181 :1
223223 |
224224LL | #[warn]
225225 | ^^^^^^^ help: must be of the form: `#[warn(lint1, lint2, ..., /*opt*/ reason = "...")]`
226226
227227error: malformed `deny` attribute input
228- --> $DIR/malformed-attrs.rs:181 :1
228+ --> $DIR/malformed-attrs.rs:183 :1
229229 |
230230LL | #[deny]
231231 | ^^^^^^^ help: must be of the form: `#[deny(lint1, lint2, ..., /*opt*/ reason = "...")]`
232232
233233error: malformed `forbid` attribute input
234- --> $DIR/malformed-attrs.rs:183 :1
234+ --> $DIR/malformed-attrs.rs:185 :1
235235 |
236236LL | #[forbid]
237237 | ^^^^^^^^^ help: must be of the form: `#[forbid(lint1, lint2, ..., /*opt*/ reason = "...")]`
238238
239239error: malformed `debugger_visualizer` attribute input
240- --> $DIR/malformed-attrs.rs:185 :1
240+ --> $DIR/malformed-attrs.rs:187 :1
241241 |
242242LL | #[debugger_visualizer]
243243 | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[debugger_visualizer(natvis_file = "...", gdb_script_file = "...")]`
244244
245245error: malformed `automatically_derived` attribute input
246- --> $DIR/malformed-attrs.rs:188 :1
246+ --> $DIR/malformed-attrs.rs:190 :1
247247 |
248248LL | #[automatically_derived = 18]
249249 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[automatically_derived]`
250250
251251error: malformed `non_exhaustive` attribute input
252- --> $DIR/malformed-attrs.rs:194 :1
252+ --> $DIR/malformed-attrs.rs:196 :1
253253 |
254254LL | #[non_exhaustive = 1]
255255 | ^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[non_exhaustive]`
256256
257257error: malformed `thread_local` attribute input
258- --> $DIR/malformed-attrs.rs:200 :1
258+ --> $DIR/malformed-attrs.rs:202 :1
259259 |
260260LL | #[thread_local()]
261261 | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[thread_local]`
262262
263263error: malformed `no_link` attribute input
264- --> $DIR/malformed-attrs.rs:204 :1
264+ --> $DIR/malformed-attrs.rs:206 :1
265265 |
266266LL | #[no_link()]
267267 | ^^^^^^^^^^^^ help: must be of the form: `#[no_link]`
268268
269269error: malformed `macro_use` attribute input
270- --> $DIR/malformed-attrs.rs:206 :1
270+ --> $DIR/malformed-attrs.rs:208 :1
271271 |
272272LL | #[macro_use = 1]
273273 | ^^^^^^^^^^^^^^^^
@@ -282,7 +282,7 @@ LL + #[macro_use]
282282 |
283283
284284error: malformed `macro_export` attribute input
285- --> $DIR/malformed-attrs.rs:211 :1
285+ --> $DIR/malformed-attrs.rs:213 :1
286286 |
287287LL | #[macro_export = 18]
288288 | ^^^^^^^^^^^^^^^^^^^^
@@ -297,7 +297,7 @@ LL + #[macro_export]
297297 |
298298
299299error: malformed `allow_internal_unsafe` attribute input
300- --> $DIR/malformed-attrs.rs:213 :1
300+ --> $DIR/malformed-attrs.rs:215 :1
301301 |
302302LL | #[allow_internal_unsafe = 1]
303303 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[allow_internal_unsafe]`
@@ -315,13 +315,13 @@ LL | #[proc_macro_attribute = 19]
315315 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
316316
317317error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
318- --> $DIR/malformed-attrs.rs:120 :1
318+ --> $DIR/malformed-attrs.rs:122 :1
319319 |
320320LL | #[proc_macro_derive]
321321 | ^^^^^^^^^^^^^^^^^^^^
322322
323323error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint
324- --> $DIR/malformed-attrs.rs:213 :1
324+ --> $DIR/malformed-attrs.rs:215 :1
325325 |
326326LL | #[allow_internal_unsafe = 1]
327327 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -367,7 +367,7 @@ LL | #[ignore()]
367367 = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
368368
369369error: invalid argument
370- --> $DIR/malformed-attrs.rs:185 :1
370+ --> $DIR/malformed-attrs.rs:187 :1
371371 |
372372LL | #[debugger_visualizer]
373373 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -538,24 +538,41 @@ LL - #[used()]
538538LL + #[used]
539539 |
540540
541+ error[E0539]: malformed `must_use` attribute input
542+ --> $DIR/malformed-attrs.rs:118:1
543+ |
544+ LL | #[must_use = 1]
545+ | ^^^^^^^^^^^^^-^
546+ | |
547+ | expected a string literal here
548+ |
549+ help: try changing it to one of the following valid forms of the attribute
550+ |
551+ LL - #[must_use = 1]
552+ LL + #[must_use = "reason"]
553+ |
554+ LL - #[must_use = 1]
555+ LL + #[must_use]
556+ |
557+
541558warning: `#[diagnostic::do_not_recommend]` does not expect any arguments
542- --> $DIR/malformed-attrs.rs:146 :1
559+ --> $DIR/malformed-attrs.rs:148 :1
543560 |
544561LL | #[diagnostic::do_not_recommend()]
545562 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
546563 |
547564 = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default
548565
549566warning: missing options for `on_unimplemented` attribute
550- --> $DIR/malformed-attrs.rs:135 :1
567+ --> $DIR/malformed-attrs.rs:137 :1
551568 |
552569LL | #[diagnostic::on_unimplemented]
553570 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
554571 |
555572 = help: at least one of the `message`, `note` and `label` options are expected
556573
557574warning: malformed `on_unimplemented` attribute
558- --> $DIR/malformed-attrs.rs:137 :1
575+ --> $DIR/malformed-attrs.rs:139 :1
559576 |
560577LL | #[diagnostic::on_unimplemented = 1]
561578 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
@@ -582,7 +599,7 @@ LL | #[coroutine = 63] || {}
582599 = note: expected unit type `()`
583600 found coroutine `{coroutine@$DIR/malformed-attrs.rs:110:23: 110:25}`
584601
585- error: aborting due to 72 previous errors; 3 warnings emitted
602+ error: aborting due to 73 previous errors; 3 warnings emitted
586603
587604Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805.
588605For more information about an error, try `rustc --explain E0308`.
0 commit comments