2022-08-10 02:42:10 -05:00
-passes_previously_accepted =
2022-07-11 12:59:04 -05:00
this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
2022-08-10 02:42:10 -05:00
-passes_see_issue =
2022-07-11 12:59:04 -05:00
see issue #{$issue} <https://github.com/rust-lang/rust/issues/{$issue}> for more information
2023-09-02 07:03:25 -05:00
passes_abi_invalid_attribute =
`#[rustc_abi]` can only be applied to function items, type aliases, and associated functions
2023-09-06 04:13:20 -05:00
passes_abi_ne =
ABIs are not compatible
left ABI = {$left}
right ABI = {$right}
2023-08-25 16:01:06 -05:00
passes_abi_of =
2023-08-30 02:57:48 -05:00
fn_abi_of({$fn_name}) = {$fn_abi}
2023-08-25 16:01:06 -05:00
2022-08-10 02:42:10 -05:00
passes_allow_incoherent_impl =
2024-06-21 17:20:45 -05:00
`rustc_allow_incoherent_impl` attribute should be applied to impl items
2022-07-11 12:59:04 -05:00
.label = the only currently supported targets are inherent methods
2022-09-21 15:05:15 -05:00
passes_allow_internal_unstable =
attribute should be applied to a macro
2022-08-10 02:42:10 -05:00
.label = not a macro
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_attr_application_enum =
attribute should be applied to an enum
2022-08-10 02:42:10 -05:00
.label = not an enum
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_attr_application_struct =
attribute should be applied to a struct
.label = not a struct
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_attr_application_struct_enum_function_method_union =
attribute should be applied to a struct, enum, function, associated function, or union
2022-08-10 02:42:10 -05:00
.label = not a struct, enum, function, associated function, or union
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_attr_application_struct_enum_union =
attribute should be applied to a struct, enum, or union
2022-07-11 12:59:04 -05:00
.label = not a struct, enum, or union
2022-09-21 15:05:15 -05:00
passes_attr_application_struct_union =
attribute should be applied to a struct or union
.label = not a struct or union
2022-07-11 12:59:04 -05:00
2022-08-10 02:42:10 -05:00
passes_attr_crate_level =
2022-07-11 12:59:04 -05:00
this attribute can only be applied at the crate level
.suggestion = to apply to the crate, use an inner attribute
.note = read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
2022-09-21 15:05:15 -05:00
passes_attr_only_in_functions =
`{$attr}` attribute can only be used on functions
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_both_ffi_const_and_pure =
`#[ffi_const]` function cannot be `#[ffi_pure]`
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_break_inside_closure =
`{$name}` inside of a closure
2022-07-11 12:59:04 -05:00
.label = cannot `{$name}` inside of a closure
2022-09-25 23:52:19 -05:00
.closure_label = enclosing closure
2022-07-11 12:59:04 -05:00
2024-05-05 17:14:23 -05:00
passes_break_inside_coroutine =
`{$name}` inside `{$kind}` {$source}
.label = cannot `{$name}` inside `{$kind}` {$source}
.coroutine_label = enclosing `{$kind}` {$source}
2022-09-21 15:05:15 -05:00
passes_break_non_loop =
2022-09-25 23:52:19 -05:00
`break` with value from a `{$kind}` loop
.label = can only break with a value inside `loop` or breakable block
.label2 = you can't `break` with a value in a `{$kind}` loop
.suggestion = use `break` on its own without a value inside this `{$kind}` loop
2022-09-21 15:05:15 -05:00
.break_expr_suggestion = alternatively, you might have meant to use the available loop label
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_cannot_stabilize_deprecated =
2022-10-02 22:22:46 -05:00
an API can't be stabilized after it is deprecated
.label = invalid version
2022-09-21 15:05:15 -05:00
.item = the stability attribute annotates this item
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_change_fields_to_be_of_unit_type =
2022-10-22 05:48:20 -05:00
consider changing the { $num ->
[one] field
*[other] fields
2022-09-21 15:05:15 -05:00
} to be of unit type to suppress this warning while preserving the field numbering, or remove the { $num ->
2022-10-22 05:48:20 -05:00
[one] field
*[other] fields
2023-05-22 20:51:25 -05:00
}
2022-09-21 15:05:15 -05:00
passes_cold =
{passes_should_be_applied_to_fn}
2022-08-10 02:42:10 -05:00
.warn = {-passes_previously_accepted}
.label = {passes_should_be_applied_to_fn.label}
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_collapse_debuginfo =
`collapse_debuginfo` attribute should be applied to macro definitions
2022-07-11 12:59:04 -05:00
.label = not a macro definition
2023-07-16 05:18:38 -05:00
passes_confusables = attribute should be applied to an inherent method
.label = not an inherent method
2022-09-21 15:05:15 -05:00
passes_continue_labeled_block =
2022-09-25 23:52:19 -05:00
`continue` pointing to a labeled block
.label = labeled blocks cannot be `continue`'d
.block_label = labeled block the `continue` points to
2023-05-22 20:51:25 -05:00
2024-07-31 10:56:09 -05:00
passes_coroutine_on_non_closure =
attribute should be applied to closures
.label = not a closure
2024-06-19 02:11:27 -05:00
passes_coverage_not_fn_or_closure =
attribute should be applied to a function definition or closure
.label = not a function or closure
2023-08-09 09:57:16 -05:00
2022-10-22 05:48:20 -05:00
passes_dead_codes =
{ $multiple ->
*[true] multiple {$descr}s are
[false] { $num ->
[one] {$descr} {$name_list} is
*[other] {$descr}s {$name_list} are
2023-05-22 20:51:25 -05:00
}
2022-10-22 05:48:20 -05:00
} never {$participle}
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_debug_visualizer_invalid =
invalid argument
2022-08-10 02:42:10 -05:00
.note_1 = expected: `natvis_file = "..."`
.note_2 = OR
2022-09-21 15:05:15 -05:00
.note_3 = expected: `gdb_script_file = "..."`
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_debug_visualizer_placement =
attribute should be applied to a module
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_debug_visualizer_unreadable =
couldn't read {$file}: {$error}
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_deprecated =
attribute is ignored here
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_deprecated_annotation_has_no_effect =
this `#[deprecated]` annotation has no effect
.suggestion = remove the unnecessary deprecation attribute
2023-05-22 20:51:25 -05:00
2022-10-02 22:22:46 -05:00
passes_deprecated_attribute =
2022-09-21 15:05:15 -05:00
deprecated attribute must be paired with either stable or unstable attribute
2023-05-22 20:51:25 -05:00
2023-06-02 06:55:46 -05:00
passes_diagnostic_diagnostic_on_unimplemented_only_for_traits =
`#[diagnostic::on_unimplemented]` can only be applied to trait definitions
2022-09-22 19:23:05 -05:00
passes_diagnostic_item_first_defined =
the diagnostic item is first defined here
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_alias_bad_char =
{$char_} character isn't allowed in {$attr_str}
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_alias_bad_location =
{$attr_str} isn't allowed on {$location}
2022-07-11 12:59:04 -05:00
2022-08-10 02:42:10 -05:00
passes_doc_alias_duplicated = doc alias is duplicated
2022-07-11 12:59:04 -05:00
.label = first defined here
2022-09-21 15:05:15 -05:00
passes_doc_alias_empty =
{$attr_str} attribute cannot have empty value
2022-07-11 12:59:04 -05:00
2022-08-10 02:42:10 -05:00
passes_doc_alias_malformed =
2022-07-11 12:59:04 -05:00
doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]`
2022-09-21 15:05:15 -05:00
passes_doc_alias_not_an_alias =
{$attr_str} is the same as the item's name
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_alias_not_string_literal =
`#[doc(alias("a"))]` expects string literals
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_alias_start_end =
{$attr_str} cannot start or end with ' '
2023-05-22 20:51:25 -05:00
2022-08-10 02:42:10 -05:00
passes_doc_attr_not_crate_level =
2022-07-11 12:59:04 -05:00
`#![doc({$attr_name} = "...")]` isn't allowed as a crate-level attribute
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_cfg_hide_takes_list =
2024-02-28 23:16:24 -06:00
`#[doc(cfg_hide(...))]` takes a list of attributes
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_expect_str =
doc {$attr_name} attribute expects a string: #[doc({$attr_name} = "a")]
2022-07-11 12:59:04 -05:00
2022-08-10 02:42:10 -05:00
passes_doc_fake_variadic_not_valid =
2022-06-16 11:50:57 -05:00
`#[doc(fake_variadic)]` must be used on the first of a set of tuple or fn pointer trait impls with varying arity
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_inline_conflict =
conflicting doc inlining attributes
.help = remove one of the conflicting attributes
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_inline_conflict_first =
this attribute...
passes_doc_inline_conflict_second =
{"."}..conflicts with this attribute
passes_doc_inline_only_use =
this attribute can only be applied to a `use` item
2022-07-11 12:59:04 -05:00
.label = only applicable on `use` items
2022-08-10 02:42:10 -05:00
.not_a_use_item_label = not a `use` item
2022-07-11 12:59:04 -05:00
.note = read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information
2022-08-10 02:42:10 -05:00
passes_doc_invalid =
2022-07-11 12:59:04 -05:00
invalid `doc` attribute
2022-09-21 15:05:15 -05:00
passes_doc_keyword_empty_mod =
2022-07-11 12:59:04 -05:00
`#[doc(keyword = "...")]` should be used on empty modules
2022-09-21 15:05:15 -05:00
passes_doc_keyword_invalid_ident =
`{$doc_keyword}` is not a valid identifier
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_keyword_not_mod =
`#[doc(keyword = "...")]` should be used on modules
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_keyword_only_impl =
`#[doc(keyword = "...")]` should be used on impl blocks
2022-07-11 12:59:04 -05:00
2023-07-21 15:31:43 -05:00
passes_doc_masked_not_extern_crate_self =
this attribute cannot be applied to an `extern crate self` item
.label = not applicable on `extern crate self` items
.extern_crate_self_label = `extern crate self` defined here
passes_doc_masked_only_extern_crate =
this attribute can only be applied to an `extern crate` item
.label = only applicable on `extern crate` items
.not_an_extern_crate_label = not an `extern crate` item
.note = read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information
2024-08-09 10:22:21 -05:00
passes_doc_rust_logo =
the `#[doc(rust_logo)]` attribute is used for Rust branding
2023-05-29 14:30:09 -05:00
passes_doc_test_literal = `#![doc(test(...)]` does not take a literal
2022-09-21 15:05:15 -05:00
passes_doc_test_takes_list =
`#[doc(test(...)]` takes a list of attributes
2022-07-11 12:59:04 -05:00
2022-10-12 04:32:00 -05:00
passes_doc_test_unknown =
unknown `doc(test)` attribute `{$path}`
2022-09-21 15:05:15 -05:00
passes_doc_test_unknown_any =
unknown `doc` attribute `{$path}`
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_test_unknown_include =
unknown `doc` attribute `{$path}`
2022-07-11 12:59:04 -05:00
.suggestion = use `doc = include_str!` instead
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_doc_test_unknown_spotlight =
unknown `doc` attribute `{$path}`
2022-07-11 12:59:04 -05:00
.note = `doc(spotlight)` was renamed to `doc(notable_trait)`
.suggestion = use `notable_trait` instead
2022-08-10 02:42:10 -05:00
.no_op_note = `doc(spotlight)` is now a no-op
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_duplicate_diagnostic_item_in_crate =
2024-06-21 17:20:45 -05:00
duplicate diagnostic item in crate `{$crate_name}`: `{$name}`
.note = the diagnostic item is first defined in crate `{$orig_crate_name}`
2022-07-11 12:59:04 -05:00
2022-09-21 15:05:15 -05:00
passes_duplicate_feature_err =
the feature `{$feature}` has already been declared
2022-07-11 12:59:04 -05:00
2022-08-10 02:42:10 -05:00
passes_duplicate_lang_item =
2022-07-11 12:59:04 -05:00
found duplicate lang item `{$lang_item_name}`
.first_defined_span = the lang item is first defined here
.first_defined_crate_depends = the lang item is first defined in crate `{$orig_crate_name}` (which `{$orig_dependency_of}` depends on)
2024-06-21 17:20:45 -05:00
.first_defined_crate = the lang item is first defined in crate `{$orig_crate_name}`
2022-10-05 17:28:32 -05:00
.first_definition_local = first definition in the local crate (`{$orig_crate_name}`)
2022-07-11 12:59:04 -05:00
.second_definition_local = second definition in the local crate (`{$crate_name}`)
2022-10-05 17:28:32 -05:00
.first_definition_path = first definition in `{$orig_crate_name}` loaded from {$orig_path}
.second_definition_path = second definition in `{$crate_name}` loaded from {$path}
2022-07-11 12:59:04 -05:00
2022-08-10 02:42:10 -05:00
passes_duplicate_lang_item_crate =
2024-06-21 17:20:45 -05:00
duplicate lang item in crate `{$crate_name}`: `{$lang_item_name}`
2022-08-10 02:42:10 -05:00
.first_defined_span = the lang item is first defined here
2022-07-11 12:59:04 -05:00
.first_defined_crate_depends = the lang item is first defined in crate `{$orig_crate_name}` (which `{$orig_dependency_of}` depends on)
2024-06-21 17:20:45 -05:00
.first_defined_crate = the lang item is first defined in crate `{$orig_crate_name}`
2022-10-05 17:28:32 -05:00
.first_definition_local = first definition in the local crate (`{$orig_crate_name}`)
2022-07-11 12:59:04 -05:00
.second_definition_local = second definition in the local crate (`{$crate_name}`)
.first_definition_path = first definition in `{$orig_crate_name}` loaded from {$orig_path}
2022-10-05 17:28:32 -05:00
.second_definition_path = second definition in `{$crate_name}` loaded from {$path}
2022-07-11 12:59:04 -05:00
2023-01-24 04:19:04 -06:00
passes_duplicate_lang_item_crate_depends =
2024-06-21 17:20:45 -05:00
duplicate lang item in crate `{$crate_name}` (which `{$dependency_of}` depends on): `{$lang_item_name}`
2023-01-24 04:19:04 -06:00
.first_defined_span = the lang item is first defined here
.first_defined_crate_depends = the lang item is first defined in crate `{$orig_crate_name}` (which `{$orig_dependency_of}` depends on)
2024-06-21 17:20:45 -05:00
.first_defined_crate = the lang item is first defined in crate `{$orig_crate_name}`
2022-10-05 17:28:32 -05:00
.first_definition_local = first definition in the local crate (`{$orig_crate_name}`)
2023-01-24 04:19:04 -06:00
.second_definition_local = second definition in the local crate (`{$crate_name}`)
.first_definition_path = first definition in `{$orig_crate_name}` loaded from {$orig_path}
2022-10-05 17:28:32 -05:00
.second_definition_path = second definition in `{$crate_name}` loaded from {$path}
2023-01-24 04:19:04 -06:00
2023-07-16 05:18:38 -05:00
passes_empty_confusables =
expected at least one confusable name
2022-09-21 15:05:15 -05:00
passes_export_name =
2023-01-24 04:19:04 -06:00
attribute should be applied to a free function, impl method or static
2022-07-19 04:00:16 -05:00
.label = not a free function, impl method or static
2023-05-22 20:51:25 -05:00
2022-09-28 15:02:03 -05:00
passes_extern_main =
2023-01-24 04:19:04 -06:00
the `main` function cannot be declared in an `extern` block
2023-05-22 20:51:25 -05:00
2023-01-24 04:19:04 -06:00
passes_feature_previously_declared =
feature `{$feature}` is declared {$declared}, but was previously declared {$prev_declared}
2023-05-22 20:51:25 -05:00
2022-09-24 13:21:58 -05:00
passes_feature_stable_twice =
feature `{$feature}` is declared stable since {$since}, but was previously declared stable since {$prev_since}
2023-01-24 04:19:04 -06:00
passes_ffi_const_invalid_target =
`#[ffi_const]` may only be used on foreign functions
passes_ffi_pure_invalid_target =
`#[ffi_pure]` may only be used on foreign functions
2023-05-22 20:51:25 -05:00
2022-08-10 02:42:10 -05:00
passes_has_incoherent_inherent_impl =
2024-06-21 17:20:45 -05:00
`rustc_has_incoherent_inherent_impls` attribute should be applied to types or traits
2022-07-11 12:59:04 -05:00
.label = only adts, extern types and traits are supported
2022-09-21 15:05:15 -05:00
passes_ignored_attr =
`#[{$sym}]` is ignored on struct fields and match arms
2022-08-10 02:42:10 -05:00
.warn = {-passes_previously_accepted}
2022-07-11 12:59:04 -05:00
.note = {-passes_see_issue(issue: "80564")}
2022-07-19 04:00:16 -05:00
2022-09-21 15:05:15 -05:00
passes_ignored_attr_with_macro =
`#[{$sym}]` is ignored on struct fields, match arms and macro defs
2022-08-10 02:42:10 -05:00
.warn = {-passes_previously_accepted}
2022-09-21 15:05:15 -05:00
.note = {-passes_see_issue(issue: "80564")}
2022-07-19 04:00:16 -05:00
2022-09-21 15:05:15 -05:00
passes_ignored_derived_impls =
2022-10-22 05:48:20 -05:00
`{$name}` has {$trait_list_len ->
[one] a derived impl
*[other] derived impls
} for the {$trait_list_len ->
[one] trait {$trait_list}, but this is
2022-09-21 15:05:15 -05:00
*[other] traits {$trait_list}, but these are
} intentionally ignored during dead code analysis
2022-07-19 04:00:16 -05:00
2022-09-21 15:05:15 -05:00
passes_implied_feature_not_exist =
feature `{$implied_by}` implying `{$feature}` does not exist
2022-07-19 04:00:16 -05:00
2022-09-21 15:05:15 -05:00
passes_incorrect_do_not_recommend_location =
2024-05-10 07:12:30 -05:00
`#[diagnostic::do_not_recommend]` can only be placed on trait implementations
2022-07-19 04:00:16 -05:00
2023-07-16 05:18:38 -05:00
passes_incorrect_meta_item = expected a quoted string literal
passes_incorrect_meta_item_suggestion = consider surrounding this with quotes
2022-09-21 15:05:15 -05:00
passes_incorrect_target =
2024-04-17 05:30:45 -05:00
`{$name}` lang item must be applied to a {$kind} with {$at_least ->
2022-09-21 15:05:15 -05:00
[true] at least {$num}
2022-10-01 14:48:22 -05:00
*[false] {$num}
2022-09-21 15:05:15 -05:00
} generic {$num ->
[one] argument
*[other] arguments
2023-05-22 20:51:25 -05:00
}
2022-07-19 04:00:16 -05:00
.label = this {$kind} has {$actual_num} generic {$actual_num ->
[one] argument
*[other] arguments
}
2022-09-21 15:05:15 -05:00
passes_ineffective_unstable_impl = an `#[unstable]` annotation here has no effect
2022-07-19 04:00:16 -05:00
.note = see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information
2022-09-21 15:05:15 -05:00
passes_inline_ignored_constants =
`#[inline]` is ignored on constants
2022-08-10 02:42:10 -05:00
.warn = {-passes_previously_accepted}
.note = {-passes_see_issue(issue: "65833")}
2022-07-19 04:00:16 -05:00
2022-09-21 15:05:15 -05:00
passes_inline_ignored_function_prototype =
2022-07-19 04:00:16 -05:00
`#[inline]` is ignored on function prototypes
2022-09-21 15:05:15 -05:00
passes_inline_not_fn_or_closure =
attribute should be applied to function or closure
2022-07-19 04:00:16 -05:00
.label = not a function or closure
2022-09-21 15:05:15 -05:00
passes_inner_crate_level_attr =
2022-09-01 17:11:44 -05:00
crate-level attribute should be in the root module
2022-09-21 15:05:15 -05:00
passes_invalid_attr_at_crate_level =
`{$name}` attribute cannot be used at crate level
2022-09-01 22:19:03 -05:00
.suggestion = perhaps you meant to use an outer attribute
2022-09-22 19:23:05 -05:00
2023-10-17 19:24:21 -05:00
passes_invalid_attr_at_crate_level_item =
the inner attribute doesn't annotate this {$kind}
2022-09-22 19:23:05 -05:00
passes_invalid_macro_export_arguments = `{$name}` isn't a valid `#[macro_export]` argument
2022-09-23 13:23:18 -05:00
passes_invalid_macro_export_arguments_too_many_items = `#[macro_export]` can only take 1 or 0 arguments
2024-04-17 05:17:29 -05:00
passes_lang_item_fn = {$name ->
[panic_impl] `#[panic_handler]`
2024-04-17 05:30:45 -05:00
*[other] `{$name}` lang item
2024-04-17 05:17:29 -05:00
} function
2023-09-18 13:11:01 -05:00
passes_lang_item_fn_with_target_feature =
2024-04-17 05:17:29 -05:00
{passes_lang_item_fn} is not allowed to have `#[target_feature]`
.label = {passes_lang_item_fn} is not allowed to have `#[target_feature]`
passes_lang_item_fn_with_track_caller =
{passes_lang_item_fn} is not allowed to have `#[track_caller]`
.label = {passes_lang_item_fn} is not allowed to have `#[target_feature]`
2023-09-18 13:11:01 -05:00
2022-09-23 13:23:18 -05:00
passes_lang_item_on_incorrect_target =
2024-04-17 05:30:45 -05:00
`{$name}` lang item must be applied to a {$expected_target}
2022-09-23 13:23:18 -05:00
.label = attribute should be applied to a {$expected_target}, not a {$actual_target}
2023-09-02 07:03:25 -05:00
passes_layout_abi =
abi: {$abi}
passes_layout_align =
align: {$align}
passes_layout_homogeneous_aggregate =
homogeneous_aggregate: {$homogeneous_aggregate}
passes_layout_invalid_attribute =
`#[rustc_layout]` can only be applied to `struct`/`enum`/`union` declarations and type aliases
2022-09-23 13:23:18 -05:00
passes_layout_of =
layout_of({$normalized_ty}) = {$ty_layout}
2023-09-02 07:03:25 -05:00
passes_layout_size =
size: {$size}
2022-09-23 13:23:18 -05:00
passes_link =
attribute should be applied to an `extern` block with non-Rust ABI
.warn = {-passes_previously_accepted}
.label = not an `extern` block
2022-09-24 13:21:58 -05:00
passes_link_name =
attribute should be applied to a foreign function or static
.warn = {-passes_previously_accepted}
.label = not a foreign function or static
.help = try `#[link(name = "{$value}")]` instead
passes_link_ordinal =
attribute should be applied to a foreign function or static
.label = not a foreign function or static
2022-09-24 13:49:29 -05:00
passes_link_section =
attribute should be applied to a function or static
.warn = {-passes_previously_accepted}
.label = not a function or static
2024-08-17 01:03:20 -05:00
passes_linkage =
attribute should be applied to a function or static
.label = not a function definition or static
2022-09-24 13:49:29 -05:00
passes_macro_export =
`#[macro_export]` only has an effect on macro definitions
2022-09-25 23:52:19 -05:00
2023-08-02 13:08:28 -05:00
passes_macro_export_on_decl_macro =
`#[macro_export]` has no effect on declarative macro definitions
.note = declarative macros follow the same exporting rules as regular items
2022-09-25 23:52:19 -05:00
passes_macro_use =
`#[{$name}]` only has an effect on `extern crate` and modules
2024-08-18 09:11:47 -05:00
passes_may_dangle =
`#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl
2022-09-25 23:52:19 -05:00
passes_maybe_string_interpolation = you might have meant to use string interpolation in this string literal
passes_missing_const_err =
attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
.help = make the function or method const
.label = attribute specified here
passes_missing_const_stab_attr =
{$descr} has missing const stability attribute
passes_missing_lang_item =
2024-04-17 05:30:45 -05:00
lang item required, but not found: `{$name}`
2022-09-25 23:52:19 -05:00
.note = this can occur when a binary crate with `#![no_std]` is compiled for a target where `{$name}` is defined in the standard library
.help = you may be able to compile for a target that doesn't need `{$name}`, specify a target with `--target` or in `.cargo/config`
passes_missing_panic_handler =
2022-11-04 20:11:50 -05:00
`#[panic_handler]` function required, but not found
2022-09-25 23:52:19 -05:00
passes_missing_stability_attr =
{$descr} has missing stability attribute
passes_multiple_rustc_main =
multiple functions with a `#[rustc_main]` attribute
.first = first `#[rustc_main]` function
.additional = additional `#[rustc_main]` function
2022-09-27 10:44:56 -05:00
passes_multiple_start_functions =
2022-09-28 15:02:03 -05:00
multiple `start` functions
2022-09-27 10:44:56 -05:00
.label = multiple `start` functions
2022-09-28 15:02:03 -05:00
.previous = previous `#[start]` function here
2022-09-27 10:44:56 -05:00
passes_must_not_suspend =
2024-08-18 09:15:29 -05:00
`must_not_suspend` attribute should be applied to a struct, enum, union, or trait
.label = is not a struct, enum, union, or trait
2022-09-27 10:44:56 -05:00
passes_must_use_no_effect =
`#[must_use]` has no effect when applied to {$article} {$target}
passes_naked_functions_asm_block =
naked functions must contain a single asm block
.label_multiple_asm = multiple asm blocks are unsupported in naked functions
.label_non_asm = non-asm is unsupported in naked functions
passes_naked_functions_asm_options =
asm options unsupported in naked functions: {$unsupported_options}
2024-07-17 03:42:24 -05:00
passes_naked_functions_incompatible_attribute =
attribute incompatible with `#[naked]`
.label = the `{$attr}` attribute is incompatible with `#[naked]`
2024-07-16 16:35:02 -05:00
.naked_attribute = function marked with `#[naked]` here
2024-07-16 16:03:13 -05:00
2022-09-27 10:44:56 -05:00
passes_naked_functions_must_use_noreturn =
asm in naked functions must use `noreturn` option
.suggestion = consider specifying that the asm block is responsible for returning from the function
2022-09-28 15:02:03 -05:00
passes_naked_functions_operands =
only `const` and `sym` operands are supported in naked functions
passes_no_link =
attribute should be applied to an `extern crate` item
.label = not an `extern crate` item
passes_no_main_function =
`main` function not found in crate `{$crate_name}`
.here_is_main = here is a function named `main`
.one_or_more_possible_main = you have one or more functions named `main` not defined at the crate level
.consider_moving_main = consider moving the `main` function definitions
.main_must_be_defined_at_crate = the main function must be defined at the crate level{$has_filename ->
[true] {" "}(in `{$filename}`)
*[false] {""}
2022-10-03 18:34:59 -05:00
}
2022-09-28 15:02:03 -05:00
.consider_adding_main_to_file = consider adding a `main` function to `{$filename}`
.consider_adding_main_at_crate = consider adding a `main` function at the crate level
.teach_note = If you don't know the basics of Rust, you can go look to the Rust Book to get started: https://doc.rust-lang.org/book/
.non_function_main = non-function item at `crate::main` is found
2022-10-01 14:48:22 -05:00
passes_no_mangle =
2022-10-05 17:28:32 -05:00
attribute should be applied to a free function, impl method or static
.warn = {-passes_previously_accepted}
.label = not a free function, impl method or static
passes_no_mangle_foreign =
`#[no_mangle]` has no effect on a foreign {$foreign_item_kind}
.warn = {-passes_previously_accepted}
.label = foreign {$foreign_item_kind}
.note = symbol names in extern blocks are not mangled
.suggestion = remove this attribute
passes_no_patterns =
2022-10-01 14:48:22 -05:00
patterns not allowed in naked function parameters
passes_non_exported_macro_invalid_attrs =
attribute should be applied to function or closure
.label = not a function or closure
2023-05-22 20:51:25 -05:00
2022-10-01 14:48:22 -05:00
passes_object_lifetime_err =
{$repr}
2023-05-22 20:51:25 -05:00
2022-10-02 15:34:10 -05:00
passes_only_has_effect_on =
2022-10-01 14:48:22 -05:00
`#[{$attr_name}]` only has an effect on {$target_name ->
2022-10-02 15:34:10 -05:00
[function] functions
2022-10-01 14:48:22 -05:00
[module] modules
[implementation_block] implementation blocks
*[unspecified] (unspecified--this is a compiler bug)
}
2023-05-22 20:51:25 -05:00
2024-07-31 14:39:39 -05:00
passes_optimize_not_fn_or_closure =
attribute should be applied to function or closure
.label = not a function or closure
2022-10-01 14:48:22 -05:00
passes_outer_crate_level_attr =
crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
2023-05-22 20:51:25 -05:00
2022-09-25 23:52:19 -05:00
passes_outside_loop =
2022-10-01 14:48:22 -05:00
`{$name}` outside of a loop{$is_break ->
[true] {" or labeled block"}
*[false] {""}
2023-05-22 20:51:25 -05:00
}
2022-10-01 14:48:22 -05:00
.label = cannot `{$name}` outside of a loop{$is_break ->
[true] {" or labeled block"}
*[false] {""}
}
2022-10-01 19:39:02 -05:00
2023-10-02 19:20:59 -05:00
passes_outside_loop_suggestion = consider labeling this block to be able to break within it
2023-10-02 07:32:31 -05:00
passes_panic_unwind_without_std =
unwinding panics are not supported without std
.note = since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem
.help = using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
2022-10-01 19:39:02 -05:00
passes_params_not_allowed =
referencing function parameters is not allowed in naked functions
.help = follow the calling convention in asm block to use parameters
2023-05-22 20:51:25 -05:00
2022-10-22 05:48:20 -05:00
passes_parent_info =
2023-05-22 20:51:25 -05:00
{$num ->
2022-10-22 05:48:20 -05:00
[one] {$descr}
*[other] {$descr}s
} in this {$parent_descr}
2023-05-22 20:51:25 -05:00
2022-10-01 19:39:02 -05:00
passes_pass_by_value =
`pass_by_value` attribute should be applied to a struct, enum or type alias
.label = is not a struct, enum or type alias
2023-05-22 20:51:25 -05:00
2022-10-01 19:39:02 -05:00
passes_proc_macro_bad_sig = {$kind} has incorrect signature
2023-05-22 20:51:25 -05:00
2024-05-13 07:12:44 -05:00
passes_remove_fields =
consider removing { $num ->
[one] this
*[other] these
} { $num ->
[one] field
*[other] fields
}
2024-08-09 10:22:21 -05:00
passes_repr_align_function =
`repr(align)` attributes on functions are unstable
2022-09-21 15:05:15 -05:00
passes_repr_conflicting =
conflicting representation hints
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_repr_ident =
2022-10-01 19:39:02 -05:00
meta item in `repr` must be an identifier
2023-05-22 20:51:25 -05:00
2022-10-01 19:39:02 -05:00
passes_rustc_allow_const_fn_unstable =
attribute should be applied to `const fn`
.label = not a `const fn`
2023-05-22 20:51:25 -05:00
2022-10-01 19:39:02 -05:00
passes_rustc_dirty_clean =
attribute requires -Z query-dep-graph to be enabled
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_rustc_layout_scalar_valid_range_arg =
2022-10-01 19:39:02 -05:00
expected exactly one integer literal argument
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_rustc_layout_scalar_valid_range_not_struct =
2022-10-07 15:39:09 -05:00
attribute should be applied to a struct
.label = not a struct
2022-10-02 15:34:10 -05:00
passes_rustc_legacy_const_generics_index =
#[rustc_legacy_const_generics] must have one index for each generic parameter
2022-07-19 04:00:16 -05:00
.label = generic parameters
2023-05-22 20:51:25 -05:00
2022-10-02 15:34:10 -05:00
passes_rustc_legacy_const_generics_index_exceed =
index exceeds number of arguments
.label = there {$arg_count ->
[one] is
2022-10-22 05:48:20 -05:00
*[other] are
2022-10-02 15:34:10 -05:00
} only {$arg_count} {$arg_count ->
[one] argument
*[other] arguments
}
passes_rustc_legacy_const_generics_index_negative =
arguments should be non-negative integers
passes_rustc_legacy_const_generics_only =
#[rustc_legacy_const_generics] functions must only have const generics
.label = non-const generic parameter
2022-10-07 15:39:09 -05:00
passes_rustc_lint_opt_deny_field_access =
`#[rustc_lint_opt_deny_field_access]` should be applied to a field
.label = not a field
passes_rustc_lint_opt_ty =
`#[rustc_lint_opt_ty]` should be applied to a struct
.label = not a struct
2024-08-24 11:44:12 -05:00
passes_rustc_pub_transparent =
attribute should be applied to `#[repr(transparent)]` types
.label = not a `#[repr(transparent)]` type
2023-09-25 14:40:40 -05:00
passes_rustc_safe_intrinsic =
attribute should be applied to intrinsic functions
.label = not an intrinsic function
2022-10-07 15:39:09 -05:00
passes_rustc_std_internal_symbol =
attribute should be applied to functions or statics
.label = not a function or static
2023-04-16 01:30:45 -05:00
passes_should_be_applied_to_fn =
attribute should be applied to a function definition
.label = {$on_crate ->
[true] cannot be applied to crates
*[false] not a function definition
2023-05-22 20:51:25 -05:00
}
2023-04-14 01:39:16 -05:00
2022-10-02 15:34:10 -05:00
passes_should_be_applied_to_static =
attribute should be applied to a static
.label = not a static
2022-10-02 22:22:46 -05:00
passes_should_be_applied_to_struct_enum =
attribute should be applied to a struct or enum
.label = not a struct or enum
passes_should_be_applied_to_trait =
attribute should be applied to a trait
.label = not a trait
passes_skipping_const_checks = skipping const checks
passes_stability_promotable =
attribute cannot be applied to an expression
passes_string_interpolation_only_works = string interpolation only works in `format!` invocations
passes_target_feature_on_statement =
{passes_should_be_applied_to_fn}
.warn = {-passes_previously_accepted}
.label = {passes_should_be_applied_to_fn.label}
passes_trait_impl_const_stable =
trait implementations cannot be const stable yet
.note = see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
passes_transparent_incompatible =
transparent {$target} cannot have other repr hints
passes_undefined_naked_function_abi =
Rust ABI is unsupported in naked functions
2022-10-22 05:48:20 -05:00
passes_unknown_external_lang_item =
2022-11-03 14:02:09 -05:00
unknown external lang item: `{$lang_item}`
2022-10-22 05:48:20 -05:00
passes_unknown_feature =
unknown feature `{$feature}`
passes_unknown_lang_item =
2024-04-17 05:30:45 -05:00
definition of an unknown lang item: `{$name}`
.label = definition of unknown lang item `{$name}`
2023-01-03 07:08:20 -06:00
2023-03-14 13:43:37 -05:00
passes_unlabeled_cf_in_while_condition =
`break` or `continue` with no label in the condition of a `while` loop
.label = unlabeled `{$cf_type}` in the condition of a `while` loop
2022-08-19 08:48:15 -05:00
passes_unlabeled_in_labeled_block =
unlabeled `{$cf_type}` inside of a labeled block
.label = `{$cf_type}` statements that would diverge to or through a labeled block need to bear a label
2023-02-10 17:53:19 -06:00
passes_unnecessary_partial_stable_feature = the feature `{$feature}` has been partially stabilized since {$since} and is succeeded by the feature `{$implies}`
.suggestion = if you are using features which are still unstable, change to using `{$implies}`
2023-04-25 12:42:42 -05:00
.suggestion_remove = if you are using features which are now stable, remove this line
2023-02-10 17:53:19 -06:00
passes_unnecessary_stable_feature = the feature `{$feature}` has been stable since {$since} and no longer requires an attribute to enable
2023-04-25 12:42:42 -05:00
passes_unreachable_due_to_uninhabited = unreachable {$descr}
.label = unreachable {$descr}
.label_orig = any code following this expression is unreachable
.note = this expression has type `{$ty}`, which is uninhabited
passes_unrecognized_field =
unrecognized field name `{$name}`
2023-05-22 20:51:25 -05:00
2023-04-25 12:42:42 -05:00
passes_unrecognized_repr_hint =
2022-10-02 15:34:10 -05:00
unrecognized representation hint
2023-08-20 08:22:39 -05:00
.help = valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
2023-05-22 20:51:25 -05:00
2023-04-25 12:42:42 -05:00
passes_unused =
2022-09-21 15:05:15 -05:00
unused attribute
2022-07-19 04:00:16 -05:00
.suggestion = remove this attribute
2023-05-22 20:51:25 -05:00
2023-04-25 12:42:42 -05:00
passes_unused_assign = value assigned to `{$name}` is never read
.help = maybe it is overwritten before being read?
2023-05-22 20:51:25 -05:00
2023-04-25 12:42:42 -05:00
passes_unused_assign_passed = value passed to `{$name}` is never read
.help = maybe it is overwritten before being read?
passes_unused_capture_maybe_capture_ref = value captured by `{$name}` is never read
.help = did you mean to capture by reference instead?
passes_unused_default_method_body_const_note =
`default_method_body_is_const` has been replaced with `#[const_trait]` on traits
passes_unused_duplicate =
unused attribute
.suggestion = remove this attribute
.note = attribute also specified here
.warn = {-passes_previously_accepted}
passes_unused_empty_lints_note =
attribute `{$name}` with an empty list has no effect
passes_unused_multiple =
multiple `{$name}` attributes
.suggestion = remove this attribute
.note = attribute also specified here
passes_unused_no_lints_note =
attribute `{$name}` without any lints has no effect
passes_unused_var_assigned_only = variable `{$name}` is assigned to, but never used
.note = consider using `_{$name}` instead
passes_unused_var_maybe_capture_ref = unused variable: `{$name}`
.help = did you mean to capture by reference instead?
passes_unused_var_remove_field = unused variable: `{$name}`
passes_unused_var_remove_field_suggestion = try removing the field
2023-05-22 20:51:25 -05:00
2023-10-30 06:20:56 -05:00
passes_unused_variable_args_in_macro = `{$name}` is captured in macro and introduced a unused variable
2023-04-25 12:42:42 -05:00
passes_unused_variable_try_ignore = unused variable: `{$name}`
.suggestion = try ignoring the field
passes_unused_variable_try_prefix = unused variable: `{$name}`
.label = unused variable
.suggestion = if this is intentional, prefix it with an underscore
2023-10-30 06:20:56 -05:00
2023-04-25 12:42:42 -05:00
passes_used_compiler_linker =
`used(compiler)` and `used(linker)` can't be used together
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_used_static =
2023-04-25 12:42:42 -05:00
attribute must be applied to a `static` variable
2024-06-29 05:45:07 -05:00
.label = but this is a {$target}
2023-05-22 20:51:25 -05:00
2023-04-25 12:42:42 -05:00
passes_useless_assignment =
useless assignment of {$is_field_assign ->
[true] field
2022-10-01 19:39:02 -05:00
*[false] variable
2023-04-25 12:42:42 -05:00
} of type `{$ty}` to itself
2023-05-22 20:51:25 -05:00
2022-09-21 15:05:15 -05:00
passes_useless_stability =
2023-04-25 12:42:42 -05:00
this stability annotation is useless
2022-10-02 22:22:46 -05:00
.label = useless stability annotation
2023-04-25 12:42:42 -05:00
.item = the stability attribute annotates this item