diff options
| author | Cormac Relf <web@cormacrelf.net> | 2021-10-13 18:44:47 +1100 |
|---|---|---|
| committer | Cormac Relf <web@cormacrelf.net> | 2021-12-13 14:02:41 +1100 |
| commit | 34a98192d513dea6b5ea4aaa74fec5b84b0fe6ee (patch) | |
| tree | 38b62c7f5cbbecb0757ba7fc6916ba134bb31ef9 /src/tools/clippy/tests/ui | |
| parent | 9b45713b6c1775f0103a1ebee6ab7c6d9b781a21 (diff) | |
| download | rust-34a98192d513dea6b5ea4aaa74fec5b84b0fe6ee.tar.gz rust-34a98192d513dea6b5ea4aaa74fec5b84b0fe6ee.zip | |
let-else: use hir::Let in clippy
fix clippy format using `cargo fmt -p clippy_{lints,utils}`
manually revert rustfmt line truncations
rename to hir::Let in clippy
Undo the shadowing of various `expr` variables after renaming `scrutinee`
reduce destructuring of hir::Let to avoid `expr` collisions
cargo fmt -p clippy_{lints,utils}
bless new clippy::author output
Diffstat (limited to 'src/tools/clippy/tests/ui')
| -rw-r--r-- | src/tools/clippy/tests/ui/author/if.stdout | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/clippy/tests/ui/author/if.stdout b/src/tools/clippy/tests/ui/author/if.stdout index 75ff3faf29a..8d92849b366 100644 --- a/src/tools/clippy/tests/ui/author/if.stdout +++ b/src/tools/clippy/tests/ui/author/if.stdout @@ -32,11 +32,11 @@ if_chain! { } if_chain! { if let ExprKind::If(cond, then, Some(else_expr)) = expr.kind; - if let ExprKind::Let(pat, expr1, _) = cond.kind; - if let PatKind::Lit(lit_expr) = pat.kind; + if let ExprKind::Let(let_expr) = cond.kind; + if let PatKind::Lit(lit_expr) = let_expr.pat.kind; if let ExprKind::Lit(ref lit) = lit_expr.kind; if let LitKind::Bool(true) = lit.node; - if let ExprKind::Path(ref qpath) = expr1.kind; + if let ExprKind::Path(ref qpath) = let_expr.init.kind; if match_qpath(qpath, &["a"]); if let ExprKind::Block(block, None) = then.kind; if block.stmts.is_empty(); |
