File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11082,11 +11082,11 @@ <h3>Example</h3>
11082
11082
_ => todo!(),
11083
11083
}
11084
11084
</code></pre>
11085
- </div><div class="lint-additional-info-container"><div class="lint-additional-info-item"><span> Applicability: </span><span class="label label-default label-applicability">MaybeIncorrect</span><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/enum.Applicability.html#variants">(?)</a></div><div class="lint-additional-info-item"><span>Added in: </span><span class="label label-default label-version">1.73.0</span></div><div class="lint-additional-info-item"><a href="https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+redundant_guards">Related Issues</a></div><div class="lint-additional-info-item"><a href="https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/matches/mod.rs#L945">View Source</a></div></div></div></article><article class="panel panel-default" id="redundant_locals"><input id="label-redundant_locals" type="checkbox"><label for="label-redundant_locals" onclick="highlightIfNeeded('redundant_locals')"><header class="panel-heading"><h2 class="panel-title"><div class="panel-title-name" id="lint-redundant_locals"><span>redundant_locals</span> <a href="#redundant_locals" onclick="lintAnchor(event)" class="anchor label label-default">¶</a> <a href="" class="anchor label label-default" onclick="copyToClipboard(event)">📋</a></div><div class="panel-title-addons"><span class="label label-lint-group label-default label-group-correctness">correctness</span> <span class="label label-lint-level label-lint-level-deny">deny</span> <span class="label label-doc-folding"></span></div></h2></header></label><div class="list-group lint-docs"><div class="list-group-item lint-doc-md"><h3>What it does</h3>
11085
+ </div><div class="lint-additional-info-container"><div class="lint-additional-info-item"><span> Applicability: </span><span class="label label-default label-applicability">MaybeIncorrect</span><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/enum.Applicability.html#variants">(?)</a></div><div class="lint-additional-info-item"><span>Added in: </span><span class="label label-default label-version">1.73.0</span></div><div class="lint-additional-info-item"><a href="https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+redundant_guards">Related Issues</a></div><div class="lint-additional-info-item"><a href="https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/matches/mod.rs#L945">View Source</a></div></div></div></article><article class="panel panel-default" id="redundant_locals"><input id="label-redundant_locals" type="checkbox"><label for="label-redundant_locals" onclick="highlightIfNeeded('redundant_locals')"><header class="panel-heading"><h2 class="panel-title"><div class="panel-title-name" id="lint-redundant_locals"><span>redundant_locals</span> <a href="#redundant_locals" onclick="lintAnchor(event)" class="anchor label label-default">¶</a> <a href="" class="anchor label label-default" onclick="copyToClipboard(event)">📋</a></div><div class="panel-title-addons"><span class="label label-lint-group label-default label-group-suspicious">suspicious</span> <span class="label label-lint-level label-lint-level-warn">warn</span> <span class="label label-doc-folding"></span></div></h2></header></label><div class="list-group lint-docs"><div class="list-group-item lint-doc-md"><h3>What it does</h3>
11086
11086
<p>Checks for redundant redefinitions of local bindings.</p>
11087
11087
<h3>Why is this bad?</h3>
11088
- <p>Redundant redefinitions of local bindings do not change behavior and are likely to be unintended.</p>
11089
- <p>Note that although these bindings do not affect your code’s meaning, they <em>may</em> affect <code>rustc</code>’s stack allocation.</p>
11088
+ <p>Redundant redefinitions of local bindings do not change behavior other than variable’s lifetimes and are likely to be unintended.</p>
11089
+ <p>These rebindings can be intentional to shorten the lifetimes of variables because they affect when the <code>Drop</code> implementation is called. Other than that, they do not affect your code’s meaning but they <em>may</em> affect <code>rustc</code>’s stack allocation.</p>
11090
11090
<h3>Example</h3>
11091
11091
<pre><code class="language-rust">let a = 0;
11092
11092
let a = a;
You can’t perform that action at this time.
0 commit comments