[no_effect_replace]: Fix duplicate diagnostics
This commit is contained in:
parent
0b4b684b46
commit
7473f0522c
3 changed files with 9 additions and 10 deletions
|
|
@ -25,6 +25,7 @@ pub(super) fn check<'tcx>(
|
|||
&& param1 == param2.as_str()
|
||||
{
|
||||
span_lint(cx, NO_EFFECT_REPLACE, expr.span, "replacing text with itself");
|
||||
return;
|
||||
}
|
||||
|
||||
if SpanlessEq::new(cx).eq_expr(arg1, arg2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue