]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_build/src/thir/cx/expr.rs
Rollup merge of #105681 - tshepang:doc-mir-visit, r=Nilstrieb
[rust.git] / compiler / rustc_mir_build / src / thir / cx / expr.rs
index 5fa41ebeb6e5966f9acf748e5ea7aa3ef1588251..261b95ba95b0e36781448e9fdc7be376773f99cb 100644 (file)
@@ -704,7 +704,7 @@ fn make_mirror_unadjusted(&mut self, expr: &'tcx hir::Expr<'tcx>) -> Expr<'tcx>
             hir::ExprKind::Field(ref source, ..) => ExprKind::Field {
                 lhs: self.mirror_expr(source),
                 variant_index: VariantIdx::new(0),
-                name: Field::new(tcx.field_index(expr.hir_id, self.typeck_results)),
+                name: Field::new(self.typeck_results.field_index(expr.hir_id)),
             },
             hir::ExprKind::Cast(ref source, ref cast_ty) => {
                 // Check for a user-given type annotation on this `cast`
@@ -1079,7 +1079,7 @@ fn field_refs(&mut self, fields: &'tcx [hir::ExprField<'tcx>]) -> Box<[FieldExpr
         fields
             .iter()
             .map(|field| FieldExpr {
-                name: Field::new(self.tcx.field_index(field.hir_id, self.typeck_results)),
+                name: Field::new(self.typeck_results.field_index(field.hir_id)),
                 expr: self.mirror_expr(field.expr),
             })
             .collect()