Skip to content

refactor(mir): remove unused argument #43920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from Aug 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/librustc_mir/build/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ should go to.

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};
Expand Down Expand Up @@ -572,7 +572,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
}
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
Expand All @@ -599,8 +599,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
};

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)
}
Expand Down Expand Up @@ -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)
Expand Down