Skip to content

Commit 3ffe01f

Browse files
author
Michael Zapata
committed
refactor(mir): remove unused argument
Small cleanup that shouldn't have any impact
1 parent be0f77d commit 3ffe01f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/librustc_mir/build/scope.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ should go to.
8989

9090
use build::{BlockAnd, BlockAndExtension, Builder, CFG};
9191
use rustc::middle::region::CodeExtent;
92-
use rustc::ty::{Ty, TyCtxt};
92+
use rustc::ty::Ty;
9393
use rustc::mir::*;
9494
use rustc::mir::transform::MirSource;
9595
use syntax_pos::{Span};
@@ -572,7 +572,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
572572
}
573573
assert!(!self.scopes.is_empty()); // or `any` above would be false
574574

575-
let Builder { ref mut hir, ref mut cfg, ref mut scopes,
575+
let Builder { ref mut cfg, ref mut scopes,
576576
ref mut cached_resume_block, .. } = *self;
577577

578578
// Build up the drops in **reverse** order. The end result will
@@ -599,8 +599,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
599599
};
600600

601601
for scope in scopes.iter_mut() {
602-
target = build_diverge_scope(
603-
hir.tcx(), cfg, scope.extent_span, scope, target);
602+
target = build_diverge_scope(cfg, scope.extent_span, scope, target);
604603
}
605604
Some(target)
606605
}
@@ -726,8 +725,7 @@ fn build_scope_drops<'tcx>(cfg: &mut CFG<'tcx>,
726725
block.unit()
727726
}
728727

729-
fn build_diverge_scope<'a, 'gcx, 'tcx>(_tcx: TyCtxt<'a, 'gcx, 'tcx>,
730-
cfg: &mut CFG<'tcx>,
728+
fn build_diverge_scope<'a, 'gcx, 'tcx>(cfg: &mut CFG<'tcx>,
731729
span: Span,
732730
scope: &mut Scope<'tcx>,
733731
mut target: BasicBlock)

0 commit comments

Comments
 (0)