diff options
| author | Philipp Krones <hello@philkrones.com> | 2024-03-21 22:05:29 +0100 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2024-03-21 22:05:29 +0100 |
| commit | 7d42d736c53dce04ec02c2ffdf876d86901de2e7 (patch) | |
| tree | c98b05e5982d9f5726f9e88d411b5662109108d4 /clippy_lints/src/methods/no_effect_replace.rs | |
| parent | 76096efb48d79ee5d3434d31285828d15a50b9c7 (diff) | |
| parent | 443f459f98841001b2c2041adda05b9318f44b24 (diff) | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_lints/src/methods/no_effect_replace.rs')
| -rw-r--r-- | clippy_lints/src/methods/no_effect_replace.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_lints/src/methods/no_effect_replace.rs b/clippy_lints/src/methods/no_effect_replace.rs index 81df32bdee2..a301a5f7d65 100644 --- a/clippy_lints/src/methods/no_effect_replace.rs +++ b/clippy_lints/src/methods/no_effect_replace.rs @@ -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) { |
