about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Daniel Faria <Nashenas88@users.noreply.github.com>2019-10-27 22:45:02 -0400
committerPaul Daniel Faria <Nashenas88@users.noreply.github.com>2019-12-02 08:37:23 -0500
commit35590b5cc8135b21e8cbb50d059febba5136d41b (patch)
treeecb4da752e9be28cc19637d3238188f93153280a
parent4de31b26d1d4a1c20456fc9ca1d39d284c79f64c (diff)
downloadrust-35590b5cc8135b21e8cbb50d059febba5136d41b.tar.gz
rust-35590b5cc8135b21e8cbb50d059febba5136d41b.zip
Fix typos caused during rebase
-rw-r--r--src/librustc_mir/borrow_check/conflict_errors.rs2
-rw-r--r--src/librustc_mir/borrow_check/mod.rs4
-rw-r--r--src/librustc_mir/transform/const_prop.rs2
-rw-r--r--src/librustc_mir/transform/no_landing_pads.rs2
-rw-r--r--src/librustc_mir/transform/promote_consts.rs2
5 files changed, 6 insertions, 6 deletions
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));