[no_effect_replace]: Fix duplicate diagnostics

This commit is contained in:
kcz 2024-03-08 22:54:06 -05:00
parent 0b4b684b46
commit 7473f0522c
No known key found for this signature in database
GPG key ID: 4D8C63ADDD1637A0
3 changed files with 9 additions and 10 deletions

View file

@ -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) {