Fix typos caused during rebase

This commit is contained in:
Paul Daniel Faria 2019-10-27 22:45:02 -04:00
parent 4de31b26d1
commit 35590b5cc8
5 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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
};

View File

@ -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)
}
}

View File

@ -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));