From f195680edb1d0ba2c04bfd6ba4fccfca184e8dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 1 May 2019 22:52:19 +0200 Subject: [PATCH] more Use->DropTemps fixes --- clippy_lints/src/utils/author.rs | 2 +- clippy_lints/src/utils/inspector.rs | 2 +- tests/ui/author/for_loop.stdout | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs index 729b2202d80..63f94628630 100644 --- a/clippy_lints/src/utils/author.rs +++ b/clippy_lints/src/utils/author.rs @@ -497,7 +497,7 @@ fn visit_expr(&mut self, expr: &Expr) { }, ExprKind::DropTemps(ref expr) => { let expr_pat = self.next("expr"); - println!("Use(ref {}) = {};", expr_pat, current); + println!("DropTemps(ref {}) = {};", expr_pat, current); self.current = expr_pat; self.visit_expr(expr); }, diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index 6cd595607d3..cde911940dc 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -331,7 +331,7 @@ fn print_expr(cx: &LateContext<'_, '_>, expr: &hir::Expr, indent: usize) { println!("{}Err", ind); }, hir::ExprKind::DropTemps(ref e) => { - println!("{}Use", ind); + println!("{}DropTemps", ind); print_expr(cx, e, indent + 1); }, } diff --git a/tests/ui/author/for_loop.stdout b/tests/ui/author/for_loop.stdout index 9402705355c..a9651c2f718 100644 --- a/tests/ui/author/for_loop.stdout +++ b/tests/ui/author/for_loop.stdout @@ -1,5 +1,5 @@ if_chain! { - if let ExprKind::Use(ref expr) = expr.node; + if let ExprKind::DropTemps(ref expr) = expr.node; if let ExprKind::Match(ref expr1, ref arms, MatchSource::ForLoopDesugar) = expr.node; if let ExprKind::Call(ref func, ref args) = expr1.node; if let ExprKind::Path(ref path) = func.node;