@@ -15,6 +15,43 @@ lint_enum_intrinsics_mem_variant =
15
15
16
16
lint_expectation = this lint expectation is unfulfilled
17
17
.note = the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message
18
+ .rationale = { $rationale }
19
+
20
+ lint_for_loops_over_fallibles =
21
+ for loop over { $article } `{ $ty } `. This is more readably written as an `if let` statement
22
+ .suggestion = consider using `if let` to clear intent
23
+ .remove_next = to iterate over `{ $recv_snip } ` remove the call to `next`
24
+ .use_while_let = to check pattern in a loop use `while let`
25
+ .use_question_mark = consider unwrapping the `Result` with `?` to iterate over its contents
26
+
27
+ lint_non_binding_let_on_sync_lock =
28
+ non-binding let on a synchronization lock
29
+
30
+ lint_non_binding_let_on_drop_type =
31
+ non-binding let on a type that implements `Drop`
32
+
33
+ lint_non_binding_let_suggestion =
34
+ consider binding to an unused variable to avoid immediately dropping the value
35
+
36
+ lint_non_binding_let_multi_suggestion =
37
+ consider immediately dropping the value
38
+
39
+ lint_deprecated_lint_name =
40
+ lint name `{ $name } ` is deprecated and may not have an effect in the future.
41
+ .suggestion = change it to
42
+
43
+ lint_renamed_or_removed_lint = { $msg }
44
+ .suggestion = use the new name
45
+
46
+ lint_unknown_lint =
47
+ unknown lint: `{ $name } `
48
+ .suggestion = did you mean
49
+
50
+ lint_ignored_unless_crate_specified = { $level } ({ $name } ) is ignored unless specified at crate level
51
+
52
+ lint_unknown_gated_lint =
53
+ unknown lint: `{ $name } `
54
+ .note = the `{ $name } ` lint is unstable
18
55
19
56
lint_hidden_unicode_codepoints = unicode codepoint changing visible direction of text present in { $label }
20
57
.label = this { $label } contains { $count ->
@@ -55,6 +92,8 @@ lint_diag_out_of_impl =
55
92
56
93
lint_untranslatable_diag = diagnostics should be created using translatable messages
57
94
95
+ lint_bad_opt_access = { $msg }
96
+
58
97
lint_cstring_ptr = getting the inner pointer of a temporary `CString`
59
98
.as_ptr_label = this pointer will be invalid
60
99
.unwrap_label = this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime
@@ -331,6 +370,8 @@ lint_builtin_anonymous_params = anonymous parameters are deprecated and will be
331
370
.suggestion = try naming the parameter or explicitly ignoring it
332
371
333
372
lint_builtin_deprecated_attr_link = use of deprecated attribute `{ $name } `: { $reason } . See { $link }
373
+ .msg_suggestion = { $msg }
374
+ .default_suggestion = remove this attribute
334
375
lint_builtin_deprecated_attr_used = use of deprecated attribute `{ $name } `: no longer used.
335
376
lint_builtin_deprecated_attr_default_suggestion = remove this attribute
336
377
@@ -391,10 +432,16 @@ lint_builtin_incomplete_features = the feature `{$name}` is incomplete and may n
391
432
.note = see issue #{ $n } <https://github.com/rust-lang/rust/issues/{ $n } > for more information
392
433
.help = consider using `min_{ $name } ` instead, which is more stable and complete
393
434
394
- lint_builtin_clashing_extern_same_name = `{ $this_fi } ` redeclared with a different signature
435
+ lint_builtin_unpermitted_type_init_zeroed = the type `{ $ty } ` does not permit zero-initialization
436
+ lint_builtin_unpermitted_type_init_unint = the type `{ $ty } ` does not permit being left uninitialized
437
+
438
+ lint_builtin_unpermitted_type_init_label = this code causes undefined behavior when executed
439
+ lint_builtin_unpermitted_type_init_label_suggestion = help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
440
+
441
+ lint_builtin_clashing_extern_same_name = `{ $this } ` redeclared with a different signature
395
442
.previous_decl_label = `{ $orig } ` previously declared here
396
443
.mismatch_label = this signature doesn't match the previous declaration
397
- lint_builtin_clashing_extern_diff_name = `{ $this_fi } ` redeclares `{ $orig } ` with a different signature
444
+ lint_builtin_clashing_extern_diff_name = `{ $this } ` redeclares `{ $orig } ` with a different signature
398
445
.previous_decl_label = `{ $orig } ` previously declared here
399
446
.mismatch_label = this signature doesn't match the previous declaration
400
447
@@ -403,6 +450,16 @@ lint_builtin_deref_nullptr = dereferencing a null pointer
403
450
404
451
lint_builtin_asm_labels = avoid using named labels in inline assembly
405
452
453
+ lint_builtin_special_module_name_used_lib = found module declaration for lib.rs
454
+ .note = lib.rs is the root of this crate's library target
455
+ .help = to refer to it from other targets, use the library's name as the path
456
+
457
+ lint_builtin_special_module_name_used_main = found module declaration for main.rs
458
+ .note = a binary crate cannot be used as library
459
+
460
+ lint_supertrait_as_deref_target = `{ $t } ` implements `Deref` with supertrait `{ $target_principal } ` as target
461
+ .label = target type is set here
462
+
406
463
lint_overruled_attribute = { $lint_level } ({ $lint_source } ) incompatible with previous forbid
407
464
.label = overruled by previous forbid
408
465
0 commit comments