2022-08-10 07:42:10 +00:00
lint_array_into_iter =
2022-06-27 12:35:31 +00:00
this method call resolves to `<&{$target} as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <{$target} as IntoIterator>::into_iter in Rust 2021
2022-08-10 07:42:10 +00:00
.use_iter_suggestion = use `.iter()` instead of `.into_iter()` to avoid ambiguity
.remove_into_iter_suggestion = or remove `.into_iter()` to iterate by value
.use_explicit_into_iter_suggestion =
2022-06-27 12:35:31 +00:00
or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
2022-06-27 13:08:02 +00:00
2022-08-10 07:42:10 +00:00
lint_enum_intrinsics_mem_discriminant =
2022-06-27 13:08:02 +00:00
the return value of `mem::discriminant` is unspecified when called with a non-enum type
.note = the argument to `discriminant` should be a reference to an enum, but it was passed a reference to a `{$ty_param}`, which is not an enum.
2022-08-10 07:42:10 +00:00
lint_enum_intrinsics_mem_variant =
2022-06-27 13:08:02 +00:00
the return value of `mem::variant_count` is unspecified when called with a non-enum type
.note = the type parameter of `variant_count` should be an enum, but it was instantiated with the type `{$ty_param}`, which is not an enum.
2022-06-27 13:15:31 +00:00
2022-08-10 07:42:10 +00:00
lint_expectation = this lint expectation is unfulfilled
2022-06-27 13:15:31 +00:00
.note = the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message
2022-06-27 13:40:55 +00:00
2022-08-10 07:42:10 +00:00
lint_hidden_unicode_codepoints = unicode codepoint changing visible direction of text present in {$label}
2022-06-27 13:40:55 +00:00
.label = this {$label} contains {$count ->
[one] an invisible
*[other] invisible
} unicode text flow control {$count ->
[one] codepoint
*[other] codepoints
}
.note = these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
2022-08-10 07:42:10 +00:00
.suggestion_remove = if their presence wasn't intentional, you can remove them
.suggestion_escape = if you want to keep them but make them visible in your source code, you can escape them
.no_suggestion_note_escape = if you want to keep them but make them visible in your source code, you can escape them: {$escaped}
2022-06-27 13:46:45 +00:00
2022-08-10 07:42:10 +00:00
lint_default_hash_types = prefer `{$preferred}` over `{$used}`, it has better performance
2022-06-27 13:46:45 +00:00
.note = a `use rustc_data_structures::fx::{$preferred}` may be necessary
2022-06-27 13:50:58 +00:00
2022-08-10 07:42:10 +00:00
lint_query_instability = using `{$query}` can result in unstable query results
2022-06-27 13:50:58 +00:00
.note = if you believe this case to be fine, allow this lint and add a comment explaining your rationale
2022-06-27 14:00:01 +00:00
2022-08-10 07:42:10 +00:00
lint_tykind_kind = usage of `ty::TyKind::<kind>`
2022-06-27 14:00:01 +00:00
.suggestion = try using `ty::<kind>` directly
2022-08-10 07:42:10 +00:00
lint_tykind = usage of `ty::TyKind`
2022-06-27 14:00:01 +00:00
.help = try using `Ty` instead
2022-08-10 07:42:10 +00:00
lint_ty_qualified = usage of qualified `ty::{$ty}`
2022-06-27 14:00:01 +00:00
.suggestion = try importing it and using it unqualified
2022-06-27 14:09:24 +00:00
2022-08-10 07:42:10 +00:00
lint_lintpass_by_hand = implementing `LintPass` by hand
2022-06-27 14:09:24 +00:00
.help = try using `declare_lint_pass!` or `impl_lint_pass!` instead
2022-06-27 14:18:30 +00:00
2022-08-10 07:42:10 +00:00
lint_non_existant_doc_keyword = found non-existing keyword `{$keyword}` used in `#[doc(keyword = \"...\")]`
2022-06-27 14:18:30 +00:00
.help = only existing keywords are allowed in core/std
2022-06-27 14:27:41 +00:00
2022-08-10 07:42:10 +00:00
lint_diag_out_of_impl =
2022-06-27 14:27:41 +00:00
diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
2022-08-10 07:42:10 +00:00
lint_untranslatable_diag = diagnostics should be created using translatable messages
2022-06-27 14:47:27 +00:00
2022-08-10 07:42:10 +00:00
lint_cstring_ptr = getting the inner pointer of a temporary `CString`
.as_ptr_label = this pointer will be invalid
.unwrap_label = this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime
2022-06-27 14:47:27 +00:00
.note = pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned
.help = for more information, see https://doc.rust-lang.org/reference/destructors.html
2022-06-27 14:57:35 +00:00
2022-08-10 07:42:10 +00:00
lint_identifier_non_ascii_char = identifier contains non-ASCII characters
2022-06-27 14:57:35 +00:00
2022-08-10 07:42:10 +00:00
lint_identifier_uncommon_codepoints = identifier contains uncommon Unicode codepoints
2022-06-27 14:57:35 +00:00
2022-08-10 07:42:10 +00:00
lint_confusable_identifier_pair = identifier pair considered confusable between `{$existing_sym}` and `{$sym}`
2022-06-27 14:57:35 +00:00
.label = this is where the previous identifier occurred
2022-08-10 07:42:10 +00:00
lint_mixed_script_confusables =
2022-06-27 14:57:35 +00:00
the usage of Script Group `{$set}` in this crate consists solely of mixed script confusables
2022-08-10 07:42:10 +00:00
.includes_note = the usage includes {$includes}
2022-06-27 14:57:35 +00:00
.note = please recheck to make sure their usages are indeed what you want
2022-06-27 15:33:57 +00:00
2022-08-10 07:42:10 +00:00
lint_non_fmt_panic = panic message is not a string literal
2022-06-27 15:33:57 +00:00
.note = this usage of `{$name}!()` is deprecated; it will be a hard error in Rust 2021
2022-08-10 07:42:10 +00:00
.more_info_note = for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
.supports_fmt_note = the `{$name}!()` macro supports formatting, so there's no need for the `format!()` macro here
.supports_fmt_suggestion = remove the `format!(..)` macro call
.display_suggestion = add a "{"{"}{"}"}" format string to `Display` the message
.debug_suggestion =
2022-06-27 15:33:57 +00:00
add a "{"{"}:?{"}"}" format string to use the `Debug` implementation of `{$ty}`
2022-08-10 07:42:10 +00:00
.panic_suggestion = {$already_suggested ->
2022-06-27 15:33:57 +00:00
[true] or use
*[false] use
} std::panic::panic_any instead
2022-08-10 07:42:10 +00:00
lint_non_fmt_panic_unused =
2022-06-27 15:33:57 +00:00
panic message contains {$count ->
[one] an unused
*[other] unused
} formatting {$count ->
[one] placeholder
*[other] placeholders
}
.note = this message is not used as a format string when given without arguments, but will be in Rust 2021
2022-08-10 07:42:10 +00:00
.add_args_suggestion = add the missing {$count ->
2022-06-27 15:33:57 +00:00
[one] argument
*[other] arguments
}
2022-08-10 07:42:10 +00:00
.add_fmt_suggestion = or add a "{"{"}{"}"}" format string to use the message literally
2022-06-27 15:33:57 +00:00
2022-08-10 07:42:10 +00:00
lint_non_fmt_panic_braces =
2022-06-27 15:33:57 +00:00
panic message contains {$count ->
[one] a brace
*[other] braces
}
.note = this message is not used as a format string, but will be in Rust 2021
.suggestion = add a "{"{"}{"}"}" format string to use the message literally
2022-06-27 15:46:25 +00:00
2022-08-10 07:42:10 +00:00
lint_non_camel_case_type = {$sort} `{$name}` should have an upper camel case name
2022-06-27 15:46:25 +00:00
.suggestion = convert the identifier to upper camel case
.label = should have an UpperCamelCase name
2022-08-10 07:42:10 +00:00
lint_non_snake_case = {$sort} `{$name}` should have a snake case name
.rename_or_convert_suggestion = rename the identifier or convert it to a snake case raw identifier
.cannot_convert_note = `{$sc}` cannot be used as a raw identifier
.rename_suggestion = rename the identifier
.convert_suggestion = convert the identifier to snake case
2022-06-27 15:46:25 +00:00
.help = convert the identifier to snake case: `{$sc}`
.label = should have a snake_case name
2022-08-10 07:42:10 +00:00
lint_non_upper_case_global = {$sort} `{$name}` should have an upper case name
2022-06-27 15:46:25 +00:00
.suggestion = convert the identifier to upper case
.label = should have an UPPER_CASE name
2022-06-27 15:52:51 +00:00
2022-08-10 07:42:10 +00:00
lint_noop_method_call = call to `.{$method}()` on a reference in this situation does nothing
2022-06-27 15:52:51 +00:00
.label = unnecessary method call
.note = the type `{$receiver_ty}` which `{$method}` is being called on is the same as the type returned from `{$method}`, so the method call does not do anything and can be removed
2022-06-27 15:57:40 +00:00
2022-08-10 07:42:10 +00:00
lint_pass_by_value = passing `{$ty}` by reference
2022-06-27 15:57:40 +00:00
.suggestion = try passing by value
2022-06-27 16:02:46 +00:00
2022-08-10 07:42:10 +00:00
lint_redundant_semicolons =
2022-06-27 16:02:46 +00:00
unnecessary trailing {$multiple ->
[true] semicolons
*[false] semicolon
}
.suggestion = remove {$multiple ->
[true] these semicolons
*[false] this semicolon
}
2022-06-27 16:11:53 +00:00
2022-08-10 07:42:10 +00:00
lint_drop_trait_constraints =
2022-06-27 16:11:53 +00:00
bounds on `{$predicate}` are most likely incorrect, consider instead using `{$needs_drop}` to detect whether a type can be trivially dropped
2022-08-10 07:42:10 +00:00
lint_drop_glue =
2022-06-27 16:11:53 +00:00
types that do not implement `Drop` can still have drop glue, consider instead using `{$needs_drop}` to detect whether a type is trivially dropped
2022-06-27 16:42:47 +00:00
2022-08-10 07:42:10 +00:00
lint_range_endpoint_out_of_range = range endpoint is out of range for `{$ty}`
2022-06-27 16:42:47 +00:00
.suggestion = use an inclusive range instead
2022-08-10 07:42:10 +00:00
lint_overflowing_bin_hex = literal out of range for `{$ty}`
.negative_note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}`
.negative_becomes_note = and the value `-{$lit}` will become `{$actually}{$ty}`
.positive_note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}` and will become `{$actually}{$ty}`
2022-06-27 16:42:47 +00:00
.suggestion = consider using the type `{$suggestion_ty}` instead
.help = consider using the type `{$suggestion_ty}` instead
2022-08-10 07:42:10 +00:00
lint_overflowing_int = literal out of range for `{$ty}`
2022-06-27 16:42:47 +00:00
.note = the literal `{$lit}` does not fit into the type `{$ty}` whose range is `{$min}..={$max}`
.help = consider using the type `{$suggestion_ty}` instead
2022-08-10 07:42:10 +00:00
lint_only_cast_u8_to_char = only `u8` can be cast into `char`
2022-06-27 16:42:47 +00:00
.suggestion = use a `char` literal instead
2022-08-10 07:42:10 +00:00
lint_overflowing_uint = literal out of range for `{$ty}`
2022-06-27 16:42:47 +00:00
.note = the literal `{$lit}` does not fit into the type `{$ty}` whose range is `{$min}..={$max}`
2022-08-10 07:42:10 +00:00
lint_overflowing_literal = literal out of range for `{$ty}`
2022-06-27 16:42:47 +00:00
.note = the literal `{$lit}` does not fit into the type `{$ty}` and will be converted to `{$ty}::INFINITY`
2022-08-10 07:42:10 +00:00
lint_unused_comparisons = comparison is useless due to type limits
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes = `extern` {$desc} uses type `{$ty}`, which is not FFI-safe
2022-06-28 08:41:49 +00:00
.label = not FFI-safe
.note = the type is defined here
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_opaque = opaque types have no C equivalent
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_fnptr_reason = this function pointer has Rust-specific calling convention
lint_improper_ctypes_fnptr_help = consider using an `extern fn(...) -> ...` function pointer instead
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_tuple_reason = tuples have unspecified layout
lint_improper_ctypes_tuple_help = consider using a struct instead
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_str_reason = string slices have no C equivalent
lint_improper_ctypes_str_help = consider using `*const u8` and a length instead
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_dyn = trait objects have no C equivalent
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_slice_reason = slices have no C equivalent
lint_improper_ctypes_slice_help = consider using a raw pointer instead
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_128bit = 128-bit integers don't currently have a known stable ABI
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_char_reason = the `char` type has no C equivalent
lint_improper_ctypes_char_help = consider using `u32` or `libc::wchar_t` instead
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_non_exhaustive = this enum is non-exhaustive
lint_improper_ctypes_non_exhaustive_variant = this enum has non-exhaustive variants
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_enum_repr_reason = enum has no representation hint
lint_improper_ctypes_enum_repr_help =
2022-06-28 08:41:49 +00:00
consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_struct_fieldless_reason = this struct has no fields
lint_improper_ctypes_struct_fieldless_help = consider adding a member to this struct
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_union_fieldless_reason = this union has no fields
lint_improper_ctypes_union_fieldless_help = consider adding a member to this union
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_struct_non_exhaustive = this struct is non-exhaustive
lint_improper_ctypes_union_non_exhaustive = this union is non-exhaustive
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_struct_layout_reason = this struct has unspecified layout
lint_improper_ctypes_struct_layout_help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_union_layout_reason = this union has unspecified layout
lint_improper_ctypes_union_layout_help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this union
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_box = box cannot be represented as a single pointer
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_enum_phantomdata = this enum contains a PhantomData field
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_struct_zst = this struct contains only zero-sized fields
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_array_reason = passing raw arrays by value is not FFI-safe
lint_improper_ctypes_array_help = consider passing a pointer to the array
2022-06-28 08:41:49 +00:00
2022-08-10 07:42:10 +00:00
lint_improper_ctypes_only_phantomdata = composed only of `PhantomData`
2022-06-28 08:52:05 +00:00
2022-08-10 07:42:10 +00:00
lint_variant_size_differences =
2022-06-28 08:52:05 +00:00
enum variant is more than three times larger ({$largest} bytes) than the next largest
2022-06-28 08:59:30 +00:00
2022-08-10 07:42:10 +00:00
lint_atomic_ordering_load = atomic loads cannot have `Release` or `AcqRel` ordering
2022-06-28 08:59:30 +00:00
.help = consider using ordering modes `Acquire`, `SeqCst` or `Relaxed`
2022-08-10 07:42:10 +00:00
lint_atomic_ordering_store = atomic stores cannot have `Acquire` or `AcqRel` ordering
2022-06-28 08:59:30 +00:00
.help = consider using ordering modes `Release`, `SeqCst` or `Relaxed`
2022-08-10 07:42:10 +00:00
lint_atomic_ordering_fence = memory fences cannot have `Relaxed` ordering
2022-06-28 08:59:30 +00:00
.help = consider using ordering modes `Acquire`, `Release`, `AcqRel` or `SeqCst`
2022-08-10 07:42:10 +00:00
lint_atomic_ordering_invalid = `{$method}`'s failure ordering may not be `Release` or `AcqRel`, since a failed `{$method}` does not result in a write
2022-06-28 08:59:30 +00:00
.label = invalid failure ordering
.help = consider using `Acquire` or `Relaxed` failure ordering instead
2022-08-10 07:42:10 +00:00
lint_unused_op = unused {$op} that must be used
2022-06-28 09:14:10 +00:00
.label = the {$op} produces a value
.suggestion = use `let _ = ...` to ignore the resulting value
2022-08-10 07:42:10 +00:00
lint_unused_result = unused result of type `{$ty}`
2022-06-28 09:14:10 +00:00
2022-08-10 07:42:10 +00:00
lint_unused_closure =
2022-06-28 09:14:10 +00:00
unused {$pre}{$count ->
[one] closure
*[other] closures
}{$post} that must be used
.note = closures are lazy and do nothing unless called
2022-08-10 07:42:10 +00:00
lint_unused_generator =
2022-06-28 09:14:10 +00:00
unused {$pre}{$count ->
[one] generator
*[other] generator
}{$post} that must be used
.note = generators are lazy and do nothing unless resumed
2022-08-10 07:42:10 +00:00
lint_unused_def = unused {$pre}`{$def}`{$post} that must be used
2022-06-28 09:19:11 +00:00
2022-08-10 07:42:10 +00:00
lint_path_statement_drop = path statement drops value
2022-06-28 09:19:11 +00:00
.suggestion = use `drop` to clarify the intent
2022-08-10 07:42:10 +00:00
lint_path_statement_no_effect = path statement with no effect
2022-06-28 09:28:57 +00:00
2022-08-10 07:42:10 +00:00
lint_unused_delim = unnecessary {$delim} around {$item}
2022-06-28 09:28:57 +00:00
.suggestion = remove these {$delim}
2022-06-28 09:32:57 +00:00
2022-08-10 07:42:10 +00:00
lint_unused_import_braces = braces around {$node} is unnecessary
2022-06-28 09:43:38 +00:00
2022-08-10 07:42:10 +00:00
lint_unused_allocation = unnecessary allocation, use `&` instead
lint_unused_allocation_mut = unnecessary allocation, use `&mut` instead
2022-06-28 09:55:42 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_while_true = denote infinite loops with `loop {"{"} ... {"}"}`
2022-06-28 09:55:42 +00:00
.suggestion = use `loop`
2022-06-28 09:56:01 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_box_pointers = type uses owned (Box type) pointers: {$ty}
2022-06-28 09:56:18 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_non_shorthand_field_patterns = the `{$ident}:` in this pattern is redundant
2022-06-28 09:56:18 +00:00
.suggestion = use shorthand field pattern
2022-06-28 09:57:05 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_overridden_symbol_name =
2022-06-28 09:57:05 +00:00
the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
2022-08-10 07:42:10 +00:00
lint_builtin_overridden_symbol_section =
2022-06-28 09:57:05 +00:00
the program's behavior with overridden link sections on items is unpredictable and Rust cannot provide guarantees when you manually override them
2022-08-10 07:42:10 +00:00
lint_builtin_allow_internal_unsafe =
2022-06-28 09:57:05 +00:00
`allow_internal_unsafe` allows defining macros using unsafe without triggering the `unsafe_code` lint at their call site
2022-08-10 07:42:10 +00:00
lint_builtin_unsafe_block = usage of an `unsafe` block
2022-06-28 09:57:05 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_unsafe_trait = declaration of an `unsafe` trait
2022-06-28 09:57:05 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_unsafe_impl = implementation of an `unsafe` trait
2022-06-28 09:57:05 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_no_mangle_fn = declaration of a `no_mangle` function
lint_builtin_export_name_fn = declaration of a function with `export_name`
lint_builtin_link_section_fn = declaration of a function with `link_section`
2022-06-28 09:57:05 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_no_mangle_static = declaration of a `no_mangle` static
lint_builtin_export_name_static = declaration of a static with `export_name`
lint_builtin_link_section_static = declaration of a static with `link_section`
2022-06-28 09:57:05 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_no_mangle_method = declaration of a `no_mangle` method
lint_builtin_export_name_method = declaration of a method with `export_name`
2022-06-28 09:57:05 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_decl_unsafe_fn = declaration of an `unsafe` function
lint_builtin_decl_unsafe_method = declaration of an `unsafe` method
lint_builtin_impl_unsafe_method = implementation of an `unsafe` method
2022-06-28 09:57:19 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_missing_doc = missing documentation for {$article} {$desc}
2022-06-28 10:23:11 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_missing_copy_impl = type could implement `Copy`; consider adding `impl Copy`
2022-06-28 10:27:26 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_missing_debug_impl =
2022-06-28 10:27:26 +00:00
type does not implement `{$debug}`; consider adding `#[derive(Debug)]` or a manual implementation
2022-06-28 10:31:44 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_anonymous_params = anonymous parameters are deprecated and will be removed in the next edition
2022-06-28 10:31:44 +00:00
.suggestion = try naming the parameter or explicitly ignoring it
2022-06-28 10:51:15 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_deprecated_attr_link = use of deprecated attribute `{$name}`: {$reason}. See {$link}
lint_builtin_deprecated_attr_used = use of deprecated attribute `{$name}`: no longer used.
lint_builtin_deprecated_attr_default_suggestion = remove this attribute
2022-06-28 12:35:33 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_unused_doc_comment = unused doc comment
2022-06-28 12:35:33 +00:00
.label = rustdoc does not generate documentation for {$kind}
2022-08-10 07:42:10 +00:00
.plain_help = use `//` for a plain comment
.block_help = use `/* */` for a plain comment
2022-06-28 12:40:59 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_no_mangle_generic = functions generic over types or consts must be mangled
2022-06-28 12:40:59 +00:00
.suggestion = remove this attribute
2022-08-10 07:42:10 +00:00
lint_builtin_const_no_mangle = const items should never be `#[no_mangle]`
2022-06-28 12:40:59 +00:00
.suggestion = try a static value
2022-06-28 12:45:49 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_mutable_transmutes =
2022-06-28 12:45:49 +00:00
transmuting &T to &mut T is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell
2022-06-28 12:50:44 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_unstable_features = unstable feature
2022-06-28 12:55:12 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_unreachable_pub = unreachable `pub` {$what}
2022-06-28 12:55:12 +00:00
.suggestion = consider restricting its visibility
.help = or consider exporting it for use by other crates
2022-06-28 13:04:42 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_type_alias_bounds_help = use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to associated types in type aliases
2022-06-28 13:04:42 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_type_alias_where_clause = where clauses are not enforced in type aliases
2022-06-28 13:04:42 +00:00
.suggestion = the clause will not be checked when the type alias is used, and should be removed
2022-08-10 07:42:10 +00:00
lint_builtin_type_alias_generic_bounds = bounds on generic parameters are not enforced in type aliases
2022-06-28 13:04:42 +00:00
.suggestion = the bound will not be checked when the type alias is used, and should be removed
2022-06-28 13:09:25 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_trivial_bounds = {$predicate_kind_name} bound {$predicate} does not depend on any type or lifetime parameters
2022-06-28 13:16:03 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_ellipsis_inclusive_range_patterns = `...` range patterns are deprecated
2022-06-28 13:16:03 +00:00
.suggestion = use `..=` for an inclusive range
2022-06-28 13:20:10 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_unnameable_test_items = cannot test inner items
2022-06-28 13:28:02 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_keyword_idents = `{$kw}` is a keyword in the {$next} edition
2022-06-28 13:28:02 +00:00
.suggestion = you can use a raw identifier to stay compatible
2022-06-28 13:32:38 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_explicit_outlives = outlives requirements can be inferred
2022-06-28 13:32:38 +00:00
.suggestion = remove {$count ->
[one] this bound
*[other] these bounds
}
2022-06-28 13:40:11 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_incomplete_features = the feature `{$name}` is incomplete and may not be safe to use and/or cause compiler crashes
2022-06-28 13:40:11 +00:00
.note = see issue #{$n} <https://github.com/rust-lang/rust/issues/{$n}> for more information
.help = consider using `min_{$name}` instead, which is more stable and complete
2022-06-28 14:08:34 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_clashing_extern_same_name = `{$this_fi}` redeclared with a different signature
.previous_decl_label = `{$orig}` previously declared here
.mismatch_label = this signature doesn't match the previous declaration
lint_builtin_clashing_extern_diff_name = `{$this_fi}` redeclares `{$orig}` with a different signature
.previous_decl_label = `{$orig}` previously declared here
.mismatch_label = this signature doesn't match the previous declaration
2022-06-28 14:12:35 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_deref_nullptr = dereferencing a null pointer
2022-06-28 14:12:35 +00:00
.label = this code causes undefined behavior when executed
2022-06-28 14:16:49 +00:00
2022-08-10 07:42:10 +00:00
lint_builtin_asm_labels = avoid using named labels in inline assembly
2022-08-19 19:50:38 +00:00
2022-08-19 21:17:14 +00:00
lint_malformed_attribute = malformed lint attribute input
lint_bad_attribute_argument = bad attribute argument
lint_reason_must_be_string_literal = reason must be a string literal
lint_reason_must_come_last = reason in lint attribute must come last
2022-08-19 19:50:38 +00:00
lint_unknown_tool = unknown tool name `{$tool_name}` found in scoped lint: `{$tool_name}::{$lint_name}`
.help = add `#![register_tool({$tool_name})]` to the crate root