fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
27.9 KiB572 linesraw
1lint_array_into_iter =
2    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
3    .use_iter_suggestion = use `.iter()` instead of `.into_iter()` to avoid ambiguity
4    .remove_into_iter_suggestion = or remove `.into_iter()` to iterate by value
5    .use_explicit_into_iter_suggestion =
6        or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
7
8lint_async_fn_in_trait = use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified
9    .note = you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future`
10    .suggestion = you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`
11
12lint_atomic_ordering_fence = memory fences cannot have `Relaxed` ordering
13    .help = consider using ordering modes `Acquire`, `Release`, `AcqRel` or `SeqCst`
14
15lint_atomic_ordering_invalid = `{$method}`'s failure ordering may not be `Release` or `AcqRel`, since a failed `{$method}` does not result in a write
16    .label = invalid failure ordering
17    .help = consider using `Acquire` or `Relaxed` failure ordering instead
18
19lint_atomic_ordering_load = atomic loads cannot have `Release` or `AcqRel` ordering
20    .help = consider using ordering modes `Acquire`, `SeqCst` or `Relaxed`
21
22lint_atomic_ordering_store = atomic stores cannot have `Acquire` or `AcqRel` ordering
23    .help = consider using ordering modes `Release`, `SeqCst` or `Relaxed`
24
25lint_bad_attribute_argument = bad attribute argument
26
27lint_bad_opt_access = {$msg}
28
29lint_builtin_allow_internal_unsafe =
30    `allow_internal_unsafe` allows defining macros using unsafe without triggering the `unsafe_code` lint at their call site
31
32lint_builtin_anonymous_params = anonymous parameters are deprecated and will be removed in the next edition
33    .suggestion = try naming the parameter or explicitly ignoring it
34
35lint_builtin_asm_labels = avoid using named labels in inline assembly
36
37lint_builtin_box_pointers = type uses owned (Box type) pointers: {$ty}
38
39lint_builtin_clashing_extern_diff_name = `{$this}` redeclares `{$orig}` with a different signature
40    .previous_decl_label = `{$orig}` previously declared here
41    .mismatch_label = this signature doesn't match the previous declaration
42
43lint_builtin_clashing_extern_same_name = `{$this}` redeclared with a different signature
44    .previous_decl_label = `{$orig}` previously declared here
45    .mismatch_label = this signature doesn't match the previous declaration
46lint_builtin_const_no_mangle = const items should never be `#[no_mangle]`
47    .suggestion = try a static value
48
49lint_builtin_decl_unsafe_fn = declaration of an `unsafe` function
50lint_builtin_decl_unsafe_method = declaration of an `unsafe` method
51lint_builtin_deprecated_attr_default_suggestion = remove this attribute
52
53lint_builtin_deprecated_attr_link = use of deprecated attribute `{$name}`: {$reason}. See {$link}
54    .msg_suggestion = {$msg}
55    .default_suggestion = remove this attribute
56lint_builtin_deprecated_attr_used = use of deprecated attribute `{$name}`: no longer used.
57lint_builtin_deref_nullptr = dereferencing a null pointer
58    .label = this code causes undefined behavior when executed
59
60lint_builtin_ellipsis_inclusive_range_patterns = `...` range patterns are deprecated
61    .suggestion = use `..=` for an inclusive range
62
63lint_builtin_explicit_outlives = outlives requirements can be inferred
64    .suggestion = remove {$count ->
65        [one] this bound
66        *[other] these bounds
67    }
68
69lint_builtin_export_name_fn = declaration of a function with `export_name`
70lint_builtin_export_name_method = declaration of a method with `export_name`
71
72lint_builtin_export_name_static = declaration of a static with `export_name`
73lint_builtin_impl_unsafe_method = implementation of an `unsafe` method
74
75lint_builtin_incomplete_features = the feature `{$name}` is incomplete and may not be safe to use and/or cause compiler crashes
76    .note = see issue #{$n} <https://github.com/rust-lang/rust/issues/{$n}> for more information
77    .help = consider using `min_{$name}` instead, which is more stable and complete
78
79lint_builtin_internal_features = the feature `{$name}` is internal to the compiler or standard library
80    .note = using it is strongly discouraged
81
82lint_builtin_keyword_idents = `{$kw}` is a keyword in the {$next} edition
83    .suggestion = you can use a raw identifier to stay compatible
84
85lint_builtin_link_section_fn = declaration of a function with `link_section`
86
87lint_builtin_link_section_static = declaration of a static with `link_section`
88
89lint_builtin_missing_copy_impl = type could implement `Copy`; consider adding `impl Copy`
90
91lint_builtin_missing_debug_impl =
92    type does not implement `{$debug}`; consider adding `#[derive(Debug)]` or a manual implementation
93
94lint_builtin_missing_doc = missing documentation for {$article} {$desc}
95
96lint_builtin_mutable_transmutes =
97    transmuting &T to &mut T is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell
98
99lint_builtin_no_mangle_fn = declaration of a `no_mangle` function
100lint_builtin_no_mangle_generic = functions generic over types or consts must be mangled
101    .suggestion = remove this attribute
102
103lint_builtin_no_mangle_method = declaration of a `no_mangle` method
104lint_builtin_no_mangle_static = declaration of a `no_mangle` static
105lint_builtin_non_shorthand_field_patterns = the `{$ident}:` in this pattern is redundant
106    .suggestion = use shorthand field pattern
107
108lint_builtin_overridden_symbol_name =
109    the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
110
111lint_builtin_overridden_symbol_section =
112    the program's behavior with overridden link sections on items is unpredictable and Rust cannot provide guarantees when you manually override them
113
114lint_builtin_special_module_name_used_lib = found module declaration for lib.rs
115    .note = lib.rs is the root of this crate's library target
116    .help = to refer to it from other targets, use the library's name as the path
117
118lint_builtin_special_module_name_used_main = found module declaration for main.rs
119    .note = a binary crate cannot be used as library
120
121lint_builtin_trivial_bounds = {$predicate_kind_name} bound {$predicate} does not depend on any type or lifetime parameters
122
123lint_builtin_type_alias_bounds_help = use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to associated types in type aliases
124
125lint_builtin_type_alias_generic_bounds = bounds on generic parameters are not enforced in type aliases
126    .suggestion = the bound will not be checked when the type alias is used, and should be removed
127
128lint_builtin_type_alias_where_clause = where clauses are not enforced in type aliases
129    .suggestion = the clause will not be checked when the type alias is used, and should be removed
130
131lint_builtin_unexpected_cli_config_name = unexpected `{$name}` as condition name
132    .help = was set with `--cfg` but isn't in the `--check-cfg` expected names
133
134lint_builtin_unexpected_cli_config_value = unexpected condition value `{$value}` for condition name `{$name}`
135    .help = was set with `--cfg` but isn't in the `--check-cfg` expected values
136
137lint_builtin_unpermitted_type_init_label = this code causes undefined behavior when executed
138lint_builtin_unpermitted_type_init_label_suggestion = help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
139
140lint_builtin_unpermitted_type_init_uninit = the type `{$ty}` does not permit being left uninitialized
141
142lint_builtin_unpermitted_type_init_zeroed = the type `{$ty}` does not permit zero-initialization
143lint_builtin_unreachable_pub = unreachable `pub` {$what}
144    .suggestion = consider restricting its visibility
145    .help = or consider exporting it for use by other crates
146
147lint_builtin_unsafe_block = usage of an `unsafe` block
148
149lint_builtin_unsafe_impl = implementation of an `unsafe` trait
150
151lint_builtin_unsafe_trait = declaration of an `unsafe` trait
152
153lint_builtin_unstable_features = unstable feature
154
155lint_builtin_unused_doc_comment = unused doc comment
156    .label = rustdoc does not generate documentation for {$kind}
157    .plain_help = use `//` for a plain comment
158    .block_help = use `/* */` for a plain comment
159
160lint_builtin_while_true = denote infinite loops with `loop {"{"} ... {"}"}`
161    .suggestion = use `loop`
162
163lint_check_name_unknown_tool = unknown lint tool: `{$tool_name}`
164
165lint_command_line_source = `forbid` lint level was set on command line
166
167lint_confusable_identifier_pair = found both `{$existing_sym}` and `{$sym}` as identifiers, which look alike
168    .current_use = this identifier can be confused with `{$existing_sym}`
169    .other_use = other identifier used here
170
171lint_cstring_ptr = getting the inner pointer of a temporary `CString`
172    .as_ptr_label = this pointer will be invalid
173    .unwrap_label = this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime
174    .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
175    .help = for more information, see https://doc.rust-lang.org/reference/destructors.html
176
177lint_default_hash_types = prefer `{$preferred}` over `{$used}`, it has better performance
178    .note = a `use rustc_data_structures::fx::{$preferred}` may be necessary
179
180lint_default_source = `forbid` lint level is the default for {$id}
181
182lint_deprecated_lint_name =
183    lint name `{$name}` is deprecated and may not have an effect in the future.
184    .suggestion = change it to
185    .help = change it to {$replace}
186
187lint_diag_out_of_impl =
188    diagnostics should only be created in `IntoDiagnostic`/`AddToDiagnostic` impls
189
190lint_drop_glue =
191    types that do not implement `Drop` can still have drop glue, consider instead using `{$needs_drop}` to detect whether a type is trivially dropped
192
193lint_drop_trait_constraints =
194    bounds on `{$predicate}` are most likely incorrect, consider instead using `{$needs_drop}` to detect whether a type can be trivially dropped
195
196lint_dropping_copy_types = calls to `std::mem::drop` with a value that implements `Copy` does nothing
197    .label = argument has type `{$arg_ty}`
198    .note = use `let _ = ...` to ignore the expression or result
199
200lint_dropping_references = calls to `std::mem::drop` with a reference instead of an owned value does nothing
201    .label = argument has type `{$arg_ty}`
202    .note = use `let _ = ...` to ignore the expression or result
203
204lint_enum_intrinsics_mem_discriminant =
205    the return value of `mem::discriminant` is unspecified when called with a non-enum type
206    .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.
207
208lint_enum_intrinsics_mem_variant =
209    the return value of `mem::variant_count` is unspecified when called with a non-enum type
210    .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.
211
212lint_expectation = this lint expectation is unfulfilled
213    .note = the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message
214    .rationale = {$rationale}
215
216lint_for_loops_over_fallibles =
217    for loop over {$article} `{$ty}`. This is more readably written as an `if let` statement
218    .suggestion = consider using `if let` to clear intent
219    .remove_next = to iterate over `{$recv_snip}` remove the call to `next`
220    .use_while_let = to check pattern in a loop use `while let`
221    .use_question_mark = consider unwrapping the `Result` with `?` to iterate over its contents
222
223lint_forgetting_copy_types = calls to `std::mem::forget` with a value that implements `Copy` does nothing
224    .label = argument has type `{$arg_ty}`
225    .note = use `let _ = ...` to ignore the expression or result
226lint_forgetting_references = calls to `std::mem::forget` with a reference instead of an owned value does nothing
227    .label = argument has type `{$arg_ty}`
228    .note = use `let _ = ...` to ignore the expression or result
229
230lint_hidden_unicode_codepoints = unicode codepoint changing visible direction of text present in {$label}
231    .label = this {$label} contains {$count ->
232        [one] an invisible
233        *[other] invisible
234    } unicode text flow control {$count ->
235        [one] codepoint
236        *[other] codepoints
237    }
238    .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
239    .suggestion_remove = if their presence wasn't intentional, you can remove them
240    .suggestion_escape = if you want to keep them but make them visible in your source code, you can escape them
241    .no_suggestion_note_escape = if you want to keep them but make them visible in your source code, you can escape them: {$escaped}
242
243lint_identifier_non_ascii_char = identifier contains non-ASCII characters
244
245lint_identifier_uncommon_codepoints = identifier contains uncommon Unicode codepoints
246
247lint_ignored_unless_crate_specified = {$level}({$name}) is ignored unless specified at crate level
248
249lint_improper_ctypes = `extern` {$desc} uses type `{$ty}`, which is not FFI-safe
250    .label = not FFI-safe
251    .note = the type is defined here
252
253lint_improper_ctypes_128bit = 128-bit integers don't currently have a known stable ABI
254
255lint_improper_ctypes_array_help = consider passing a pointer to the array
256
257lint_improper_ctypes_array_reason = passing raw arrays by value is not FFI-safe
258lint_improper_ctypes_box = box cannot be represented as a single pointer
259
260lint_improper_ctypes_char_help = consider using `u32` or `libc::wchar_t` instead
261
262lint_improper_ctypes_char_reason = the `char` type has no C equivalent
263lint_improper_ctypes_dyn = trait objects have no C equivalent
264
265lint_improper_ctypes_enum_repr_help =
266    consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
267
268lint_improper_ctypes_enum_repr_reason = enum has no representation hint
269lint_improper_ctypes_fnptr_help = consider using an `extern fn(...) -> ...` function pointer instead
270
271lint_improper_ctypes_fnptr_reason = this function pointer has Rust-specific calling convention
272lint_improper_ctypes_non_exhaustive = this enum is non-exhaustive
273lint_improper_ctypes_non_exhaustive_variant = this enum has non-exhaustive variants
274
275lint_improper_ctypes_only_phantomdata = composed only of `PhantomData`
276
277lint_improper_ctypes_opaque = opaque types have no C equivalent
278
279lint_improper_ctypes_slice_help = consider using a raw pointer instead
280
281lint_improper_ctypes_slice_reason = slices have no C equivalent
282lint_improper_ctypes_str_help = consider using `*const u8` and a length instead
283
284lint_improper_ctypes_str_reason = string slices have no C equivalent
285lint_improper_ctypes_struct_fieldless_help = consider adding a member to this struct
286
287lint_improper_ctypes_struct_fieldless_reason = this struct has no fields
288lint_improper_ctypes_struct_layout_help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
289
290lint_improper_ctypes_struct_layout_reason = this struct has unspecified layout
291lint_improper_ctypes_struct_non_exhaustive = this struct is non-exhaustive
292lint_improper_ctypes_struct_zst = this struct contains only zero-sized fields
293
294lint_improper_ctypes_tuple_help = consider using a struct instead
295
296lint_improper_ctypes_tuple_reason = tuples have unspecified layout
297lint_improper_ctypes_union_fieldless_help = consider adding a member to this union
298
299lint_improper_ctypes_union_fieldless_reason = this union has no fields
300lint_improper_ctypes_union_layout_help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this union
301
302lint_improper_ctypes_union_layout_reason = this union has unspecified layout
303lint_improper_ctypes_union_non_exhaustive = this union is non-exhaustive
304
305# FIXME: we should ordinalize $valid_up_to when we add support for doing so
306lint_invalid_from_utf8_checked = calls to `{$method}` with a invalid literal always return an error
307    .label = the literal was valid UTF-8 up to the {$valid_up_to} bytes
308
309# FIXME: we should ordinalize $valid_up_to when we add support for doing so
310lint_invalid_from_utf8_unchecked = calls to `{$method}` with a invalid literal are undefined behavior
311    .label = the literal was valid UTF-8 up to the {$valid_up_to} bytes
312
313lint_invalid_nan_comparisons_eq_ne = incorrect NaN comparison, NaN cannot be directly compared to itself
314    .suggestion = use `f32::is_nan()` or `f64::is_nan()` instead
315
316lint_invalid_nan_comparisons_lt_le_gt_ge = incorrect NaN comparison, NaN is not orderable
317
318lint_invalid_reference_casting_assign_to_ref = assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
319    .label = casting happend here
320
321lint_invalid_reference_casting_borrow_as_mut = casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
322    .label = casting happend here
323
324lint_invalid_reference_casting_note_book = for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
325
326lint_lintpass_by_hand = implementing `LintPass` by hand
327    .help = try using `declare_lint_pass!` or `impl_lint_pass!` instead
328
329lint_malformed_attribute = malformed lint attribute input
330
331lint_map_unit_fn = `Iterator::map` call that discard the iterator's values
332    .note = `Iterator::map`, like many of the methods on `Iterator`, gets executed lazily, meaning that its effects won't be visible until it is iterated
333    .function_label = this function returns `()`, which is likely not what you wanted
334    .argument_label = called `Iterator::map` with callable that returns `()`
335    .map_label = after this call to map, the resulting iterator is `impl Iterator<Item = ()>`, which means the only information carried by the iterator is the number of items
336    .suggestion = you might have meant to use `Iterator::for_each`
337
338lint_mixed_script_confusables =
339    the usage of Script Group `{$set}` in this crate consists solely of mixed script confusables
340    .includes_note = the usage includes {$includes}
341    .note = please recheck to make sure their usages are indeed what you want
342
343lint_multiple_supertrait_upcastable = `{$ident}` is object-safe and has multiple supertraits
344
345lint_node_source = `forbid` level set here
346    .note = {$reason}
347
348lint_non_binding_let_multi_suggestion =
349    consider immediately dropping the value
350
351lint_non_binding_let_on_drop_type =
352    non-binding let on a type that implements `Drop`
353
354lint_non_binding_let_on_sync_lock =
355    non-binding let on a synchronization lock
356
357lint_non_binding_let_suggestion =
358    consider binding to an unused variable to avoid immediately dropping the value
359
360lint_non_camel_case_type = {$sort} `{$name}` should have an upper camel case name
361    .suggestion = convert the identifier to upper camel case
362    .label = should have an UpperCamelCase name
363
364lint_non_existent_doc_keyword = found non-existing keyword `{$keyword}` used in `#[doc(keyword = "...")]`
365    .help = only existing keywords are allowed in core/std
366
367lint_non_fmt_panic = panic message is not a string literal
368    .note = this usage of `{$name}!()` is deprecated; it will be a hard error in Rust 2021
369    .more_info_note = for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
370    .supports_fmt_note = the `{$name}!()` macro supports formatting, so there's no need for the `format!()` macro here
371    .supports_fmt_suggestion = remove the `format!(..)` macro call
372    .display_suggestion = add a "{"{"}{"}"}" format string to `Display` the message
373    .debug_suggestion =
374        add a "{"{"}:?{"}"}" format string to use the `Debug` implementation of `{$ty}`
375    .panic_suggestion = {$already_suggested ->
376        [true] or use
377        *[false] use
378    } std::panic::panic_any instead
379
380lint_non_fmt_panic_braces =
381    panic message contains {$count ->
382        [one] a brace
383        *[other] braces
384    }
385    .note = this message is not used as a format string, but will be in Rust 2021
386    .suggestion = add a "{"{"}{"}"}" format string to use the message literally
387
388lint_non_fmt_panic_unused =
389    panic message contains {$count ->
390        [one] an unused
391        *[other] unused
392    } formatting {$count ->
393        [one] placeholder
394        *[other] placeholders
395    }
396    .note = this message is not used as a format string when given without arguments, but will be in Rust 2021
397    .add_args_suggestion = add the missing {$count ->
398        [one] argument
399        *[other] arguments
400    }
401    .add_fmt_suggestion = or add a "{"{"}{"}"}" format string to use the message literally
402
403lint_non_snake_case = {$sort} `{$name}` should have a snake case name
404    .rename_or_convert_suggestion = rename the identifier or convert it to a snake case raw identifier
405    .cannot_convert_note = `{$sc}` cannot be used as a raw identifier
406    .rename_suggestion = rename the identifier
407    .convert_suggestion = convert the identifier to snake case
408    .help = convert the identifier to snake case: `{$sc}`
409    .label = should have a snake_case name
410
411lint_non_upper_case_global = {$sort} `{$name}` should have an upper case name
412    .suggestion = convert the identifier to upper case
413    .label = should have an UPPER_CASE name
414
415lint_noop_method_call = call to `.{$method}()` on a reference in this situation does nothing
416    .suggestion = remove this redundant call
417    .note = the type `{$orig_ty}` does not implement `{$trait_}`, so calling `{$method}` on `&{$orig_ty}` copies the reference, which does not do anything and can be removed
418
419lint_only_cast_u8_to_char = only `u8` can be cast into `char`
420    .suggestion = use a `char` literal instead
421
422lint_opaque_hidden_inferred_bound = opaque type `{$ty}` does not satisfy its associated type bounds
423    .specifically = this associated type bound is unsatisfied for `{$proj_ty}`
424
425lint_opaque_hidden_inferred_bound_sugg = add this bound
426
427lint_overflowing_bin_hex = literal out of range for `{$ty}`
428    .negative_note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}`
429    .negative_becomes_note = and the value `-{$lit}` will become `{$actually}{$ty}`
430    .positive_note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}` and will become `{$actually}{$ty}`
431    .suggestion = consider using the type `{$suggestion_ty}` instead
432    .sign_bit_suggestion = to use as a negative number (decimal `{$negative_val}`), consider using the type `{$uint_ty}` for the literal and cast it to `{$int_ty}`
433    .help = consider using the type `{$suggestion_ty}` instead
434
435lint_overflowing_int = literal out of range for `{$ty}`
436    .note = the literal `{$lit}` does not fit into the type `{$ty}` whose range is `{$min}..={$max}`
437    .help = consider using the type `{$suggestion_ty}` instead
438
439lint_overflowing_literal = literal out of range for `{$ty}`
440    .note = the literal `{$lit}` does not fit into the type `{$ty}` and will be converted to `{$ty}::INFINITY`
441
442lint_overflowing_uint = literal out of range for `{$ty}`
443    .note = the literal `{$lit}` does not fit into the type `{$ty}` whose range is `{$min}..={$max}`
444
445lint_overruled_attribute = {$lint_level}({$lint_source}) incompatible with previous forbid
446    .label = overruled by previous forbid
447
448lint_pass_by_value = passing `{$ty}` by reference
449    .suggestion = try passing by value
450
451lint_path_statement_drop = path statement drops value
452    .suggestion = use `drop` to clarify the intent
453
454lint_path_statement_no_effect = path statement with no effect
455
456lint_ptr_null_checks_fn_ptr = function pointers are not nullable, so checking them for null will always return false
457    .help = wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
458    .label = expression has type `{$orig_ty}`
459
460lint_ptr_null_checks_fn_ret = returned pointer of `{$fn_name}` call is never null, so checking it for null will always return false
461
462lint_ptr_null_checks_ref = references are not nullable, so checking them for null will always return false
463    .label = expression has type `{$orig_ty}`
464
465lint_query_instability = using `{$query}` can result in unstable query results
466    .note = if you believe this case to be fine, allow this lint and add a comment explaining your rationale
467
468lint_range_endpoint_out_of_range = range endpoint is out of range for `{$ty}`
469
470lint_range_use_inclusive_range = use an inclusive range instead
471
472
473lint_reason_must_be_string_literal = reason must be a string literal
474
475lint_reason_must_come_last = reason in lint attribute must come last
476
477lint_redundant_semicolons =
478    unnecessary trailing {$multiple ->
479        [true] semicolons
480        *[false] semicolon
481    }
482    .suggestion = remove {$multiple ->
483        [true] these semicolons
484        *[false] this semicolon
485    }
486
487lint_removed_lint = lint `{$name}` has been removed: {$reason}
488
489lint_renamed_lint = lint `{$name}` has been renamed to `{$replace}`
490    .suggestion = use the new name
491    .help = use the new name `{$replace}`
492
493lint_requested_level = requested on the command line with `{$level} {$lint_name}`
494
495lint_supertrait_as_deref_target = `{$t}` implements `Deref` with supertrait `{$target_principal}` as target
496    .label = target type is set here
497
498lint_suspicious_double_ref_clone =
499    using `.clone()` on a double reference, which returns `{$ty}` instead of cloning the inner type
500
501lint_suspicious_double_ref_deref =
502    using `.deref()` on a double reference, which returns `{$ty}` instead of dereferencing the inner type
503
504lint_trivial_untranslatable_diag = diagnostic with static strings only
505
506lint_ty_qualified = usage of qualified `ty::{$ty}`
507    .suggestion = try importing it and using it unqualified
508
509lint_tykind = usage of `ty::TyKind`
510    .help = try using `Ty` instead
511
512lint_tykind_kind = usage of `ty::TyKind::<kind>`
513    .suggestion = try using `ty::<kind>` directly
514
515lint_undropped_manually_drops = calls to `std::mem::drop` with `std::mem::ManuallyDrop` instead of the inner value does nothing
516    .label = argument has type `{$arg_ty}`
517    .suggestion = use `std::mem::ManuallyDrop::into_inner` to get the inner value
518
519lint_ungated_async_fn_track_caller = `#[track_caller]` on async functions is a no-op
520     .label = this function will not propagate the caller location
521
522lint_unknown_gated_lint =
523    unknown lint: `{$name}`
524    .note = the `{$name}` lint is unstable
525
526lint_unknown_lint =
527    unknown lint: `{$name}`
528    .suggestion = did you mean
529    .help = did you mean: `{$replace}`
530
531lint_unknown_tool_in_scoped_lint = unknown tool name `{$tool_name}` found in scoped lint: `{$tool_name}::{$lint_name}`
532    .help = add `#![register_tool({$tool_name})]` to the crate root
533
534lint_unsupported_group = `{$lint_group}` lint group is not supported with ´--force-warn´
535
536lint_untranslatable_diag = diagnostics should be created using translatable messages
537
538lint_unused_allocation = unnecessary allocation, use `&` instead
539lint_unused_allocation_mut = unnecessary allocation, use `&mut` instead
540
541lint_unused_closure =
542    unused {$pre}{$count ->
543        [one] closure
544        *[other] closures
545    }{$post} that must be used
546    .note = closures are lazy and do nothing unless called
547
548lint_unused_comparisons = comparison is useless due to type limits
549
550lint_unused_def = unused {$pre}`{$def}`{$post} that must be used
551    .suggestion = use `let _ = ...` to ignore the resulting value
552
553lint_unused_delim = unnecessary {$delim} around {$item}
554    .suggestion = remove these {$delim}
555
556lint_unused_generator =
557    unused {$pre}{$count ->
558        [one] generator
559        *[other] generator
560    }{$post} that must be used
561    .note = generators are lazy and do nothing unless resumed
562
563lint_unused_import_braces = braces around {$node} is unnecessary
564
565lint_unused_op = unused {$op} that must be used
566    .label = the {$op} produces a value
567    .suggestion = use `let _ = ...` to ignore the resulting value
568
569lint_unused_result = unused result of type `{$ty}`
570
571lint_variant_size_differences =
572    enum variant is more than three times larger ({$largest} bytes) than the next largest