diff --git a/src/librustc_mir/borrow_check/conflict_errors.rs b/src/librustc_mir/borrow_check/conflict_errors.rs index b44ef1c1706..d9686ac2192 100644 --- a/src/librustc_mir/borrow_check/conflict_errors.rs +++ b/src/librustc_mir/borrow_check/conflict_errors.rs @@ -244,7 +244,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { ); } let span = if let Some(local) = place.as_local() { - let decl = &self.body.local_decls[local]; + let decl = &self.body_cache.local_decls[local]; Some(decl.source_info.span) } else { None diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs index 6205638c24a..426c0190596 100644 --- a/src/librustc_mir/borrow_check/mod.rs +++ b/src/librustc_mir/borrow_check/mod.rs @@ -1152,7 +1152,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { // (e.g., `x = ...`) so long as it has never been initialized // before (at this point in the flow). if let Some(local) = place_span.0.as_local() { - if let Mutability::Not = self.body+cache.local_decls[local].mutability { + if let Mutability::Not = self.body_cache.local_decls[local].mutability { // check for reassignments to immutable local variables self.check_if_reassignment_to_immutable_state( location, @@ -1306,7 +1306,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { Operand::Move(ref place) | Operand::Copy(ref place) => { match place.as_local() { Some(local) if !self.body_cache.local_decls[local].is_user_variable() => { - if self.body.local_decls[local].ty.is_mutable_ptr() { + if self.body_cache.local_decls[local].ty.is_mutable_ptr() { // The variable will be marked as mutable by the borrow. return; } diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index fdfbe59f078..ddd9ccbe64a 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -8,7 +8,7 @@ use rustc::hir::def::DefKind; use rustc::hir::def_id::DefId; use rustc::mir::{ AggregateKind, Constant, Location, Place, PlaceBase, Body, BodyCache, Operand, Local, UnOp, - Rvalue. StatementKind, Statement, LocalKind, TerminatorKind, Terminator, ClearCrossCrate, + Rvalue, StatementKind, Statement, LocalKind, TerminatorKind, Terminator, ClearCrossCrate, SourceInfo, BinOp, SourceScope, SourceScopeData, LocalDecl, BasicBlock, ReadOnlyBodyCache, read_only, RETURN_PLACE }; diff --git a/src/librustc_mir/transform/no_landing_pads.rs b/src/librustc_mir/transform/no_landing_pads.rs index 07dd4120528..4f290f487b9 100644 --- a/src/librustc_mir/transform/no_landing_pads.rs +++ b/src/librustc_mir/transform/no_landing_pads.rs @@ -18,7 +18,7 @@ impl<'tcx> NoLandingPads<'tcx> { impl<'tcx> MirPass<'tcx> for NoLandingPads<'tcx> { fn run_pass(&self, tcx: TyCtxt<'tcx>, _: MirSource<'tcx>, body_cache: &mut BodyCache<'tcx>) { - no_landing_pads(tcx, body) + no_landing_pads(tcx, body_cache) } } diff --git a/src/librustc_mir/transform/promote_consts.rs b/src/librustc_mir/transform/promote_consts.rs index e409bb08429..3b4b50c657b 100644 --- a/src/librustc_mir/transform/promote_consts.rs +++ b/src/librustc_mir/transform/promote_consts.rs @@ -831,7 +831,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> { self.temps[temp] = TempState::PromotedOut; } - let num_stmts = self.source_cacje[loc.block].statements.len(); + let num_stmts = self.source_cache[loc.block].statements.len(); let new_temp = self.promoted_cache.local_decls.push( LocalDecl::new_temp(self.source_cache.local_decls[temp].ty, self.source_cache.local_decls[temp].source_info.span));