]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #43920 - michael-zapata:cleanup/mir, r=arielb1
authorCorey Farwell <coreyf@rwell.org>
Thu, 17 Aug 2017 14:44:13 +0000 (10:44 -0400)
committerGitHub <noreply@github.com>
Thu, 17 Aug 2017 14:44:13 +0000 (10:44 -0400)
refactor(mir): remove unused argument

Small cleanup that shouldn't have any impact, as it's a small thing introduced in #43772

src/librustc_mir/build/scope.rs

index d22969d5a1b2a08c13d3e839e80e0a2a3dbf59d0..c36da9410f34adb60ef892eb159921df4b26a1fc 100644 (file)
@@ -89,7 +89,7 @@
 
 use build::{BlockAnd, BlockAndExtension, Builder, CFG};
 use rustc::middle::region::CodeExtent;
-use rustc::ty::{Ty, TyCtxt};
+use rustc::ty::Ty;
 use rustc::mir::*;
 use rustc::mir::transform::MirSource;
 use syntax_pos::{Span};
@@ -572,7 +572,7 @@ pub fn diverge_cleanup(&mut self) -> Option<BasicBlock> {
         }
         assert!(!self.scopes.is_empty()); // or `any` above would be false
 
-        let Builder { ref mut hir, ref mut cfg, ref mut scopes,
+        let Builder { ref mut cfg, ref mut scopes,
                       ref mut cached_resume_block, .. } = *self;
 
         // Build up the drops in **reverse** order. The end result will
@@ -599,8 +599,7 @@ pub fn diverge_cleanup(&mut self) -> Option<BasicBlock> {
         };
 
         for scope in scopes.iter_mut() {
-            target = build_diverge_scope(
-                hir.tcx(), cfg, scope.extent_span, scope, target);
+            target = build_diverge_scope(cfg, scope.extent_span, scope, target);
         }
         Some(target)
     }
@@ -726,8 +725,7 @@ fn build_scope_drops<'tcx>(cfg: &mut CFG<'tcx>,
     block.unit()
 }
 
-fn build_diverge_scope<'a, 'gcx, 'tcx>(_tcx: TyCtxt<'a, 'gcx, 'tcx>,
-                                       cfg: &mut CFG<'tcx>,
+fn build_diverge_scope<'a, 'gcx, 'tcx>(cfg: &mut CFG<'tcx>,
                                        span: Span,
                                        scope: &mut Scope<'tcx>,
                                        mut target: BasicBlock)