]> git.lizzy.rs Git - rust.git/commitdiff
more Use->DropTemps fixes
authorMatthias Krüger <matthias.krueger@famsik.de>
Wed, 1 May 2019 20:52:19 +0000 (22:52 +0200)
committerMatthias Krüger <matthias.krueger@famsik.de>
Wed, 1 May 2019 21:04:35 +0000 (23:04 +0200)
clippy_lints/src/utils/author.rs
clippy_lints/src/utils/inspector.rs
tests/ui/author/for_loop.stdout

index 729b2202d80868e936bf5efdb6c1485a86edb890..63f946286307ed7ea998d631526481d9f7cbde6c 100644 (file)
@@ -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);
             },
index 6cd595607d3bd567e7c841cebb2e2242891d97b9..cde911940dc1011589f36ddf7fec1c2a3eebebad 100644 (file)
@@ -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);
         },
     }
index 9402705355ccf28bcd19057d1b09f6d01c968baa..a9651c2f718b1f2d09b740244459aebcf414024b 100644 (file)
@@ -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;