@@ -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
@@ -120,25 +120,25 @@ LL | #[proc_macro_attribute = 19]
120120 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_attribute]`
121121
122122error: malformed `proc_macro_derive` attribute input
123- --> $DIR/malformed-attrs.rs:120 :1
123+ --> $DIR/malformed-attrs.rs:122 :1
124124 |
125125LL | #[proc_macro_derive]
126126 | ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
127127
128128error: malformed `rustc_layout_scalar_valid_range_start` attribute input
129- --> $DIR/malformed-attrs.rs:125 :1
129+ --> $DIR/malformed-attrs.rs:127 :1
130130 |
131131LL | #[rustc_layout_scalar_valid_range_start]
132132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_layout_scalar_valid_range_start(value)]`
133133
134134error: malformed `rustc_layout_scalar_valid_range_end` attribute input
135- --> $DIR/malformed-attrs.rs:127 :1
135+ --> $DIR/malformed-attrs.rs:129 :1
136136 |
137137LL | #[rustc_layout_scalar_valid_range_end]
138138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_layout_scalar_valid_range_end(value)]`
139139
140140error: malformed `must_not_suspend` attribute input
141- --> $DIR/malformed-attrs.rs:129 :1
141+ --> $DIR/malformed-attrs.rs:131 :1
142142 |
143143LL | #[must_not_suspend()]
144144 | ^^^^^^^^^^^^^^^^^^^^^
@@ -153,115 +153,115 @@ LL + #[must_not_suspend]
153153 |
154154
155155error: malformed `cfi_encoding` attribute input
156- --> $DIR/malformed-attrs.rs:131 :1
156+ --> $DIR/malformed-attrs.rs:133 :1
157157 |
158158LL | #[cfi_encoding]
159159 | ^^^^^^^^^^^^^^^ help: must be of the form: `#[cfi_encoding = "encoding"]`
160160
161161error: malformed `type_const` attribute input
162- --> $DIR/malformed-attrs.rs:140 :5
162+ --> $DIR/malformed-attrs.rs:142 :5
163163 |
164164LL | #[type_const = 1]
165165 | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[type_const]`
166166
167167error: malformed `marker` attribute input
168- --> $DIR/malformed-attrs.rs:152 :1
168+ --> $DIR/malformed-attrs.rs:154 :1
169169 |
170170LL | #[marker = 3]
171171 | ^^^^^^^^^^^^^ help: must be of the form: `#[marker]`
172172
173173error: malformed `fundamental` attribute input
174- --> $DIR/malformed-attrs.rs:154 :1
174+ --> $DIR/malformed-attrs.rs:156 :1
175175 |
176176LL | #[fundamental()]
177177 | ^^^^^^^^^^^^^^^^ help: must be of the form: `#[fundamental]`
178178
179179error: malformed `ffi_pure` attribute input
180- --> $DIR/malformed-attrs.rs:162 :5
180+ --> $DIR/malformed-attrs.rs:164 :5
181181 |
182182LL | #[unsafe(ffi_pure = 1)]
183183 | ^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[ffi_pure]`
184184
185185error: malformed `link_ordinal` attribute input
186- --> $DIR/malformed-attrs.rs:164 :5
186+ --> $DIR/malformed-attrs.rs:166 :5
187187 |
188188LL | #[link_ordinal]
189189 | ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_ordinal(ordinal)]`
190190
191191error: malformed `ffi_const` attribute input
192- --> $DIR/malformed-attrs.rs:168 :5
192+ --> $DIR/malformed-attrs.rs:170 :5
193193 |
194194LL | #[unsafe(ffi_const = 1)]
195195 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[ffi_const]`
196196
197197error: malformed `linkage` attribute input
198- --> $DIR/malformed-attrs.rs:170 :5
198+ --> $DIR/malformed-attrs.rs:172 :5
199199 |
200200LL | #[linkage]
201201 | ^^^^^^^^^^ help: must be of the form: `#[linkage = "external|internal|..."]`
202202
203203error: malformed `allow` attribute input
204- --> $DIR/malformed-attrs.rs:175 :1
204+ --> $DIR/malformed-attrs.rs:177 :1
205205 |
206206LL | #[allow]
207207 | ^^^^^^^^ help: must be of the form: `#[allow(lint1, lint2, ..., /*opt*/ reason = "...")]`
208208
209209error: malformed `expect` attribute input
210- --> $DIR/malformed-attrs.rs:177 :1
210+ --> $DIR/malformed-attrs.rs:179 :1
211211 |
212212LL | #[expect]
213213 | ^^^^^^^^^ help: must be of the form: `#[expect(lint1, lint2, ..., /*opt*/ reason = "...")]`
214214
215215error: malformed `warn` attribute input
216- --> $DIR/malformed-attrs.rs:179 :1
216+ --> $DIR/malformed-attrs.rs:181 :1
217217 |
218218LL | #[warn]
219219 | ^^^^^^^ help: must be of the form: `#[warn(lint1, lint2, ..., /*opt*/ reason = "...")]`
220220
221221error: malformed `deny` attribute input
222- --> $DIR/malformed-attrs.rs:181 :1
222+ --> $DIR/malformed-attrs.rs:183 :1
223223 |
224224LL | #[deny]
225225 | ^^^^^^^ help: must be of the form: `#[deny(lint1, lint2, ..., /*opt*/ reason = "...")]`
226226
227227error: malformed `forbid` attribute input
228- --> $DIR/malformed-attrs.rs:183 :1
228+ --> $DIR/malformed-attrs.rs:185 :1
229229 |
230230LL | #[forbid]
231231 | ^^^^^^^^^ help: must be of the form: `#[forbid(lint1, lint2, ..., /*opt*/ reason = "...")]`
232232
233233error: malformed `debugger_visualizer` attribute input
234- --> $DIR/malformed-attrs.rs:185 :1
234+ --> $DIR/malformed-attrs.rs:187 :1
235235 |
236236LL | #[debugger_visualizer]
237237 | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[debugger_visualizer(natvis_file = "...", gdb_script_file = "...")]`
238238
239239error: malformed `automatically_derived` attribute input
240- --> $DIR/malformed-attrs.rs:188 :1
240+ --> $DIR/malformed-attrs.rs:190 :1
241241 |
242242LL | #[automatically_derived = 18]
243243 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[automatically_derived]`
244244
245245error: malformed `non_exhaustive` attribute input
246- --> $DIR/malformed-attrs.rs:194 :1
246+ --> $DIR/malformed-attrs.rs:196 :1
247247 |
248248LL | #[non_exhaustive = 1]
249249 | ^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[non_exhaustive]`
250250
251251error: malformed `thread_local` attribute input
252- --> $DIR/malformed-attrs.rs:200 :1
252+ --> $DIR/malformed-attrs.rs:202 :1
253253 |
254254LL | #[thread_local()]
255255 | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[thread_local]`
256256
257257error: malformed `no_link` attribute input
258- --> $DIR/malformed-attrs.rs:204 :1
258+ --> $DIR/malformed-attrs.rs:206 :1
259259 |
260260LL | #[no_link()]
261261 | ^^^^^^^^^^^^ help: must be of the form: `#[no_link]`
262262
263263error: malformed `macro_use` attribute input
264- --> $DIR/malformed-attrs.rs:206 :1
264+ --> $DIR/malformed-attrs.rs:208 :1
265265 |
266266LL | #[macro_use = 1]
267267 | ^^^^^^^^^^^^^^^^
@@ -276,7 +276,7 @@ LL + #[macro_use]
276276 |
277277
278278error: malformed `macro_export` attribute input
279- --> $DIR/malformed-attrs.rs:211 :1
279+ --> $DIR/malformed-attrs.rs:213 :1
280280 |
281281LL | #[macro_export = 18]
282282 | ^^^^^^^^^^^^^^^^^^^^
@@ -291,7 +291,7 @@ LL + #[macro_export]
291291 |
292292
293293error: malformed `allow_internal_unsafe` attribute input
294- --> $DIR/malformed-attrs.rs:213 :1
294+ --> $DIR/malformed-attrs.rs:215 :1
295295 |
296296LL | #[allow_internal_unsafe = 1]
297297 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[allow_internal_unsafe]`
@@ -309,13 +309,13 @@ LL | #[proc_macro_attribute = 19]
309309 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
310310
311311error: 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
313313 |
314314LL | #[proc_macro_derive]
315315 | ^^^^^^^^^^^^^^^^^^^^
316316
317317error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint
318- --> $DIR/malformed-attrs.rs:213 :1
318+ --> $DIR/malformed-attrs.rs:215 :1
319319 |
320320LL | #[allow_internal_unsafe = 1]
321321 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -361,7 +361,7 @@ LL | #[ignore()]
361361 = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
362362
363363error: invalid argument
364- --> $DIR/malformed-attrs.rs:185 :1
364+ --> $DIR/malformed-attrs.rs:187 :1
365365 |
366366LL | #[debugger_visualizer]
367367 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -541,24 +541,41 @@ LL | #[link_name]
541541 | expected this to be of the form `link_name = "..."`
542542 | help: must be of the form: `#[link_name = "name"]`
543543
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+
544561warning: `#[diagnostic::do_not_recommend]` does not expect any arguments
545- --> $DIR/malformed-attrs.rs:146 :1
562+ --> $DIR/malformed-attrs.rs:148 :1
546563 |
547564LL | #[diagnostic::do_not_recommend()]
548565 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
549566 |
550567 = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default
551568
552569warning: missing options for `on_unimplemented` attribute
553- --> $DIR/malformed-attrs.rs:135 :1
570+ --> $DIR/malformed-attrs.rs:137 :1
554571 |
555572LL | #[diagnostic::on_unimplemented]
556573 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
557574 |
558575 = help: at least one of the `message`, `note` and `label` options are expected
559576
560577warning: malformed `on_unimplemented` attribute
561- --> $DIR/malformed-attrs.rs:137 :1
578+ --> $DIR/malformed-attrs.rs:139 :1
562579 |
563580LL | #[diagnostic::on_unimplemented = 1]
564581 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
@@ -585,7 +602,7 @@ LL | #[coroutine = 63] || {}
585602 = note: expected unit type `()`
586603 found coroutine `{coroutine@$DIR/malformed-attrs.rs:110:23: 110:25}`
587604
588- error: aborting due to 72 previous errors; 3 warnings emitted
605+ error: aborting due to 73 previous errors; 3 warnings emitted
589606
590607Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805.
591608For more information about an error, try `rustc --explain E0308`.
0 commit comments