From 597cb283ddc79e60c7a9ebe3eaf8e8c35396737d Mon Sep 17 00:00:00 2001 From: b-naber Date: Thu, 11 Feb 2021 16:20:49 +0100 Subject: [PATCH] consume subexpr of type ascription in expr_use_visitor --- compiler/rustc_typeck/src/expr_use_visitor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_typeck/src/expr_use_visitor.rs b/compiler/rustc_typeck/src/expr_use_visitor.rs index 84a67590bba6d..ba1b6c7990403 100644 --- a/compiler/rustc_typeck/src/expr_use_visitor.rs +++ b/compiler/rustc_typeck/src/expr_use_visitor.rs @@ -187,7 +187,7 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> { let place_with_id = return_if_err!(self.mc.cat_expr(expr)); self.delegate_consume(&place_with_id, place_with_id.hir_id); - self.walk_expr(subexpr); + self.consume_expr(subexpr); } hir::ExprKind::Unary(hir::UnOp::UnDeref, ref base) => {