1 -passes_previously_accepted =
2 this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5 see issue #{$issue} <https://github.com/rust-lang/rust/issues/{$issue}> for more information
7 passes_outer_crate_level_attr =
8 crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
10 passes_inner_crate_level_attr =
11 crate-level attribute should be in the root module
13 passes_ignored_attr_with_macro =
14 `#[{$sym}]` is ignored on struct fields, match arms and macro defs
15 .warn = {-passes_previously_accepted}
16 .note = {-passes_see_issue(issue: "80564")}
19 `#[{$sym}]` is ignored on struct fields and match arms
20 .warn = {-passes_previously_accepted}
21 .note = {-passes_see_issue(issue: "80564")}
23 passes_inline_ignored_function_prototype =
24 `#[inline]` is ignored on function prototypes
26 passes_inline_ignored_constants =
27 `#[inline]` is ignored on constants
28 .warn = {-passes_previously_accepted}
29 .note = {-passes_see_issue(issue: "65833")}
31 passes_inline_not_fn_or_closure =
32 attribute should be applied to function or closure
33 .label = not a function or closure
35 passes_no_coverage_ignored_function_prototype =
36 `#[no_coverage]` is ignored on function prototypes
38 passes_no_coverage_propagate =
39 `#[no_coverage]` does not propagate into items and must be applied to the contained functions directly
41 passes_no_coverage_fn_defn =
42 `#[no_coverage]` may only be applied to function definitions
44 passes_no_coverage_not_coverable =
45 `#[no_coverage]` must be applied to coverable code
46 .label = not coverable code
48 passes_should_be_applied_to_fn =
49 attribute should be applied to a function definition
50 .label = not a function definition
52 passes_naked_tracked_caller =
53 cannot use `#[track_caller]` with `#[naked]`
55 passes_should_be_applied_to_struct_enum =
56 attribute should be applied to a struct or enum
57 .label = not a struct or enum
59 passes_should_be_applied_to_trait =
60 attribute should be applied to a trait
63 passes_target_feature_on_statement =
64 {passes_should_be_applied_to_fn}
65 .warn = {-passes_previously_accepted}
66 .label = {passes_should_be_applied_to_fn.label}
68 passes_should_be_applied_to_static =
69 attribute should be applied to a static
72 passes_doc_expect_str =
73 doc {$attr_name} attribute expects a string: #[doc({$attr_name} = "a")]
75 passes_doc_alias_empty =
76 {$attr_str} attribute cannot have empty value
78 passes_doc_alias_bad_char =
79 {$char_} character isn't allowed in {$attr_str}
81 passes_doc_alias_start_end =
82 {$attr_str} cannot start or end with ' '
84 passes_doc_alias_bad_location =
85 {$attr_str} isn't allowed on {$location}
87 passes_doc_alias_not_an_alias =
88 {$attr_str} is the same as the item's name
90 passes_doc_alias_duplicated = doc alias is duplicated
91 .label = first defined here
93 passes_doc_alias_not_string_literal =
94 `#[doc(alias("a"))]` expects string literals
96 passes_doc_alias_malformed =
97 doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]`
99 passes_doc_keyword_empty_mod =
100 `#[doc(keyword = "...")]` should be used on empty modules
102 passes_doc_keyword_not_mod =
103 `#[doc(keyword = "...")]` should be used on modules
105 passes_doc_keyword_invalid_ident =
106 `{$doc_keyword}` is not a valid identifier
108 passes_doc_fake_variadic_not_valid =
109 `#[doc(fake_variadic)]` must be used on the first of a set of tuple or fn pointer trait impls with varying arity
111 passes_doc_keyword_only_impl =
112 `#[doc(keyword = "...")]` should be used on impl blocks
114 passes_doc_inline_conflict_first =
117 passes_doc_inline_conflict_second =
118 {"."}..conflicts with this attribute
120 passes_doc_inline_conflict =
121 conflicting doc inlining attributes
122 .help = remove one of the conflicting attributes
124 passes_doc_inline_only_use =
125 this attribute can only be applied to a `use` item
126 .label = only applicable on `use` items
127 .not_a_use_item_label = not a `use` item
128 .note = read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information
130 passes_doc_attr_not_crate_level =
131 `#![doc({$attr_name} = "...")]` isn't allowed as a crate-level attribute
133 passes_attr_crate_level =
134 this attribute can only be applied at the crate level
135 .suggestion = to apply to the crate, use an inner attribute
136 .help = to apply to the crate, use an inner attribute
137 .note = read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
139 passes_doc_test_unknown =
140 unknown `doc(test)` attribute `{$path}`
142 passes_doc_test_takes_list =
143 `#[doc(test(...)]` takes a list of attributes
145 passes_doc_primitive =
146 `doc(primitive)` should never have been stable
148 passes_doc_test_unknown_any =
149 unknown `doc` attribute `{$path}`
151 passes_doc_test_unknown_spotlight =
152 unknown `doc` attribute `{$path}`
153 .note = `doc(spotlight)` was renamed to `doc(notable_trait)`
154 .suggestion = use `notable_trait` instead
155 .no_op_note = `doc(spotlight)` is now a no-op
157 passes_doc_test_unknown_include =
158 unknown `doc` attribute `{$path}`
159 .suggestion = use `doc = include_str!` instead
162 invalid `doc` attribute
164 passes_pass_by_value =
165 `pass_by_value` attribute should be applied to a struct, enum or type alias
166 .label = is not a struct, enum or type alias
168 passes_allow_incoherent_impl =
169 `rustc_allow_incoherent_impl` attribute should be applied to impl items.
170 .label = the only currently supported targets are inherent methods
172 passes_has_incoherent_inherent_impl =
173 `rustc_has_incoherent_inherent_impls` attribute should be applied to types or traits.
174 .label = only adts, extern types and traits are supported
176 passes_must_use_async =
177 `must_use` attribute on `async` functions applies to the anonymous `Future` returned by the function, not the value within
178 .label = this attribute does nothing, the `Future`s returned by async functions are already `must_use`
180 passes_must_use_no_effect =
181 `#[must_use]` has no effect when applied to {$article} {$target}
183 passes_must_not_suspend =
184 `must_not_suspend` attribute should be applied to a struct, enum, or trait
185 .label = is not a struct, enum, or trait
188 {passes_should_be_applied_to_fn}
189 .warn = {-passes_previously_accepted}
190 .label = {passes_should_be_applied_to_fn.label}
193 attribute should be applied to an `extern` block with non-Rust ABI
194 .warn = {-passes_previously_accepted}
195 .label = not an `extern` block
198 attribute should be applied to a foreign function or static
199 .warn = {-passes_previously_accepted}
200 .label = not a foreign function or static
201 .help = try `#[link(name = "{$value}")]` instead
204 attribute should be applied to an `extern crate` item
205 .label = not an `extern crate` item
208 attribute should be applied to a free function, impl method or static
209 .label = not a free function, impl method or static
211 passes_rustc_layout_scalar_valid_range_not_struct =
212 attribute should be applied to a struct
213 .label = not a struct
215 passes_rustc_layout_scalar_valid_range_arg =
216 expected exactly one integer literal argument
218 passes_rustc_legacy_const_generics_only =
219 #[rustc_legacy_const_generics] functions must only have const generics
220 .label = non-const generic parameter
222 passes_rustc_legacy_const_generics_index =
223 #[rustc_legacy_const_generics] must have one index for each generic parameter
224 .label = generic parameters
226 passes_rustc_legacy_const_generics_index_exceed =
227 index exceeds number of arguments
228 .label = there {$arg_count ->
231 } only {$arg_count} {$arg_count ->
236 passes_rustc_legacy_const_generics_index_negative =
237 arguments should be non-negative integers
239 passes_rustc_dirty_clean =
240 attribute requires -Z query-dep-graph to be enabled
242 passes_link_section =
243 attribute should be applied to a function or static
244 .warn = {-passes_previously_accepted}
245 .label = not a function or static
247 passes_no_mangle_foreign =
248 `#[no_mangle]` has no effect on a foreign {$foreign_item_kind}
249 .warn = {-passes_previously_accepted}
250 .label = foreign {$foreign_item_kind}
251 .note = symbol names in extern blocks are not mangled
252 .suggestion = remove this attribute
255 attribute should be applied to a free function, impl method or static
256 .warn = {-passes_previously_accepted}
257 .label = not a free function, impl method or static
260 meta item in `repr` must be an identifier
262 passes_repr_conflicting =
263 conflicting representation hints
266 attribute must be applied to a `static` variable
268 passes_used_compiler_linker =
269 `used(compiler)` and `used(linker)` can't be used together
271 passes_allow_internal_unstable =
272 attribute should be applied to a macro
275 passes_debug_visualizer_placement =
276 attribute should be applied to a module
278 passes_debug_visualizer_invalid =
280 .note_1 = expected: `natvis_file = "..."`
282 .note_3 = expected: `gdb_script_file = "..."`
284 passes_debug_visualizer_unreadable =
285 couldn't read {$file}: {$error}
287 passes_rustc_allow_const_fn_unstable =
288 attribute should be applied to `const fn`
289 .label = not a `const fn`
291 passes_rustc_std_internal_symbol =
292 attribute should be applied to functions or statics
293 .label = not a function or static
296 attribute should be applied to a trait
298 passes_stability_promotable =
299 attribute cannot be applied to an expression
302 attribute is ignored here
305 `#[{$name}]` only has an effect on `extern crate` and modules
307 passes_macro_export =
308 `#[macro_export]` only has an effect on macro definitions
310 passes_plugin_registrar =
311 `#[plugin_registrar]` only has an effect on functions
313 passes_unused_empty_lints_note =
314 attribute `{$name}` with an empty list has no effect
316 passes_unused_no_lints_note =
317 attribute `{$name}` without any lints has no effect
319 passes_unused_default_method_body_const_note =
320 `default_method_body_is_const` has been replaced with `#[const_trait]` on traits
324 .suggestion = remove this attribute
326 passes_non_exported_macro_invalid_attrs =
327 attribute should be applied to function or closure
328 .label = not a function or closure
330 passes_unused_duplicate =
332 .suggestion = remove this attribute
333 .note = attribute also specified here
334 .warn = {-passes_previously_accepted}
336 passes_unused_multiple =
337 multiple `{$name}` attributes
338 .suggestion = remove this attribute
339 .note = attribute also specified here
341 passes_rustc_lint_opt_ty =
342 `#[rustc_lint_opt_ty]` should be applied to a struct
343 .label = not a struct
345 passes_rustc_lint_opt_deny_field_access =
346 `#[rustc_lint_opt_deny_field_access]` should be applied to a field
349 passes_link_ordinal =
350 attribute should be applied to a foreign function or static
351 .label = not a foreign function or static
353 passes_collapse_debuginfo =
354 `collapse_debuginfo` attribute should be applied to macro definitions
355 .label = not a macro definition
357 passes_deprecated_annotation_has_no_effect =
358 this `#[deprecated]` annotation has no effect
359 .suggestion = remove the unnecessary deprecation attribute
361 passes_unknown_external_lang_item =
362 unknown external lang item: `{$lang_item}`
364 passes_missing_panic_handler =
365 `#[panic_handler]` function required, but not found
367 passes_alloc_func_required =
368 `#[alloc_error_handler]` function required, but not found
370 passes_missing_alloc_error_handler =
371 use `#![feature(default_alloc_error_handler)]` for a default error handler
373 passes_missing_lang_item =
374 language item required, but not found: `{$name}`
375 .note = this can occur when a binary crate with `#![no_std]` is compiled for a target where `{$name}` is defined in the standard library
376 .help = you may be able to compile for a target that doesn't need `{$name}`, specify a target with `--target` or in `.cargo/config`
378 passes_lang_item_on_incorrect_target =
379 `{$name}` language item must be applied to a {$expected_target}
380 .label = attribute should be applied to a {$expected_target}, not a {$actual_target}
382 passes_unknown_lang_item =
383 definition of an unknown language item: `{$name}`
384 .label = definition of unknown language item `{$name}`
386 passes_local_duplicate_lang_item =
387 found duplicate lang item `{$name}`
389 passes_invalid_attr_at_crate_level =
390 `{$name}` attribute cannot be used at crate level
391 .suggestion = perhaps you meant to use an outer attribute
393 passes_duplicate_diagnostic_item =
394 duplicate diagnostic item found: `{$name}`.
396 passes_duplicate_diagnostic_item_in_crate =
397 duplicate diagnostic item in crate `{$crate_name}`: `{$name}`.
399 passes_diagnostic_item_first_defined =
400 the diagnostic item is first defined here
401 .note = the diagnostic item is first defined in crate `{$orig_crate_name}`.
412 passes_homogeneous_aggregate =
413 homogeneous_aggregate: {$homogeneous_aggregate}
416 layout_of({$normalized_ty}) = {$ty_layout}
418 passes_unrecognized_field =
419 unrecognized field name `{$name}`
422 layout error: {$layout_error}
424 passes_feature_stable_twice =
425 feature `{$feature}` is declared stable since {$since}, but was previously declared stable since {$prev_since}
427 passes_feature_previously_declared =
428 feature `{$feature}` is declared {$declared}, but was previously declared {$prev_declared}
430 passes_expr_not_allowed_in_context =
431 {$expr} is not allowed in a `{$context}`
433 passes_const_impl_const_trait =
434 const `impl`s must be for traits marked with `#[const_trait]`
435 .note = this trait must be annotated with `#[const_trait]`
437 passes_break_non_loop =
438 `break` with value from a `{$kind}` loop
439 .label = can only break with a value inside `loop` or breakable block
440 .label2 = you can't `break` with a value in a `{$kind}` loop
441 .suggestion = use `break` on its own without a value inside this `{$kind}` loop
442 .break_expr_suggestion = alternatively, you might have meant to use the available loop label
444 passes_continue_labeled_block =
445 `continue` pointing to a labeled block
446 .label = labeled blocks cannot be `continue`'d
447 .block_label = labeled block the `continue` points to
449 passes_break_inside_closure =
450 `{$name}` inside of a closure
451 .label = cannot `{$name}` inside of a closure
452 .closure_label = enclosing closure
454 passes_break_inside_async_block =
455 `{$name}` inside of an `async` block
456 .label = cannot `{$name}` inside of an `async` block
457 .async_block_label = enclosing `async` block
459 passes_outside_loop =
460 `{$name}` outside of a loop
461 .label = cannot `{$name}` outside of a loop
463 passes_unlabeled_in_labeled_block =
464 unlabeled `{$cf_type}` inside of a labeled block
465 .label = `{$cf_type}` statements that would diverge to or through a labeled block need to bear a label
467 passes_unlabeled_cf_in_while_condition =
468 `break` or `continue` with no label in the condition of a `while` loop
469 .label = unlabeled `{$cf_type}` in the condition of a `while` loop
471 passes_cannot_inline_naked_function =
472 naked functions cannot be inlined
474 passes_undefined_naked_function_abi =
475 Rust ABI is unsupported in naked functions
478 patterns not allowed in naked function parameters
480 passes_params_not_allowed =
481 referencing function parameters is not allowed in naked functions
482 .help = follow the calling convention in asm block to use parameters
484 passes_naked_functions_asm_block =
485 naked functions must contain a single asm block
486 .label_multiple_asm = multiple asm blocks are unsupported in naked functions
487 .label_non_asm = non-asm is unsupported in naked functions
489 passes_naked_functions_operands =
490 only `const` and `sym` operands are supported in naked functions
492 passes_naked_functions_asm_options =
493 asm options unsupported in naked functions: {$unsupported_options}
495 passes_naked_functions_must_use_noreturn =
496 asm in naked functions must use `noreturn` option
497 .suggestion = consider specifying that the asm block is responsible for returning from the function