commit
491fb01af5
2 changed files with 2 additions and 2 deletions
|
@ -170,7 +170,7 @@ fn lint_same_cond(cx: &LateContext, conds: &[&Expr]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Implementation if `MATCH_SAME_ARMS`.
|
/// Implementation of `MATCH_SAME_ARMS`.
|
||||||
fn lint_match_arms(cx: &LateContext, expr: &Expr) {
|
fn lint_match_arms(cx: &LateContext, expr: &Expr) {
|
||||||
if let ExprMatch(_, ref arms, MatchSource::Normal) = expr.node {
|
if let ExprMatch(_, ref arms, MatchSource::Normal) = expr.node {
|
||||||
let hash = |&(_, arm): &(usize, &Arm)| -> u64 {
|
let hash = |&(_, arm): &(usize, &Arm)| -> u64 {
|
||||||
|
|
|
@ -55,7 +55,7 @@ declare_clippy_lint! {
|
||||||
/// **Why is this bad?** Name shadowing can hurt readability, especially in
|
/// **Why is this bad?** Name shadowing can hurt readability, especially in
|
||||||
/// large code bases, because it is easy to lose track of the active binding at
|
/// large code bases, because it is easy to lose track of the active binding at
|
||||||
/// any place in the code. This can be alleviated by either giving more specific
|
/// any place in the code. This can be alleviated by either giving more specific
|
||||||
/// names to bindings ore introducing more scopes to contain the bindings.
|
/// names to bindings or introducing more scopes to contain the bindings.
|
||||||
///
|
///
|
||||||
/// **Known problems:** This lint, as the other shadowing related lints,
|
/// **Known problems:** This lint, as the other shadowing related lints,
|
||||||
/// currently only catches very simple patterns.
|
/// currently only catches very simple patterns.
|
||||||
|
|
Loading…
Reference in a new issue