more Use->DropTemps fixes

This commit is contained in:
Matthias Krüger 2019-05-01 22:52:19 +02:00
parent 24e856f10a
commit f195680edb
3 changed files with 3 additions and 3 deletions

View file

@ -497,7 +497,7 @@ impl<'tcx> Visitor<'tcx> for PrintVisitor {
},
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);
},

View 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);
},
}

View 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;