diff options
| -rw-r--r-- | compiler/rustc_typeck/src/check/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/check/expr.rs b/compiler/rustc_typeck/src/check/expr.rs index 096c4fcf472..8d370e440ea 100644 --- a/compiler/rustc_typeck/src/check/expr.rs +++ b/compiler/rustc_typeck/src/check/expr.rs @@ -1508,7 +1508,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } } else { self.check_expr_has_type_or_error(base_expr, adt_ty, |_| { - let base_ty = self.check_expr(base_expr); + let base_ty = self.typeck_results.borrow().node_type(base_expr.hir_id); let same_adt = match (adt_ty.kind(), base_ty.kind()) { (ty::Adt(adt, _), ty::Adt(base_adt, _)) if adt == base_adt => true, _ => false, |
