add match to diagnostic messages
This commit is contained in:
parent
e92806704b
commit
475378f0c6
@ -51,7 +51,12 @@ lint_renamed_or_removed_lint = {$msg}
|
||||
.suggestion = use the new name
|
||||
|
||||
lint_suspicious_double_ref_op =
|
||||
using `.{$call}()` on a double reference, which returns `{$ty}` instead of {$op} the inner type
|
||||
using `.{$call}()` on a double reference, which returns `{$ty}` instead of {$op ->
|
||||
*[should_not_happen] [{$op}]
|
||||
[deref] dereferencing
|
||||
[borrow] borrowing
|
||||
[clone] cloning
|
||||
} the inner type
|
||||
|
||||
lint_unknown_lint =
|
||||
unknown lint: `{$name}`
|
||||
|
@ -103,9 +103,9 @@ impl<'tcx> LateLintPass<'tcx> for NoopMethodCall {
|
||||
let Some(name) = cx.tcx.get_diagnostic_name(i.def_id()) else { return };
|
||||
|
||||
let op = match name {
|
||||
sym::noop_method_borrow => "borrowing",
|
||||
sym::noop_method_clone => "cloning",
|
||||
sym::noop_method_deref => "dereferencing",
|
||||
sym::noop_method_borrow => "borrow",
|
||||
sym::noop_method_clone => "clone",
|
||||
sym::noop_method_deref => "deref",
|
||||
_ => return,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user