mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
refactor(mir): remove unused argument
Small cleanup that shouldn't have any impact
This commit is contained in:
parent
be0f77dc8a
commit
3ffe01f40a
@ -89,7 +89,7 @@ should go to.
|
|||||||
|
|
||||||
use build::{BlockAnd, BlockAndExtension, Builder, CFG};
|
use build::{BlockAnd, BlockAndExtension, Builder, CFG};
|
||||||
use rustc::middle::region::CodeExtent;
|
use rustc::middle::region::CodeExtent;
|
||||||
use rustc::ty::{Ty, TyCtxt};
|
use rustc::ty::Ty;
|
||||||
use rustc::mir::*;
|
use rustc::mir::*;
|
||||||
use rustc::mir::transform::MirSource;
|
use rustc::mir::transform::MirSource;
|
||||||
use syntax_pos::{Span};
|
use syntax_pos::{Span};
|
||||||
@ -572,7 +572,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
|
|||||||
}
|
}
|
||||||
assert!(!self.scopes.is_empty()); // or `any` above would be false
|
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;
|
ref mut cached_resume_block, .. } = *self;
|
||||||
|
|
||||||
// Build up the drops in **reverse** order. The end result will
|
// Build up the drops in **reverse** order. The end result will
|
||||||
@ -599,8 +599,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
for scope in scopes.iter_mut() {
|
for scope in scopes.iter_mut() {
|
||||||
target = build_diverge_scope(
|
target = build_diverge_scope(cfg, scope.extent_span, scope, target);
|
||||||
hir.tcx(), cfg, scope.extent_span, scope, target);
|
|
||||||
}
|
}
|
||||||
Some(target)
|
Some(target)
|
||||||
}
|
}
|
||||||
@ -726,8 +725,7 @@ fn build_scope_drops<'tcx>(cfg: &mut CFG<'tcx>,
|
|||||||
block.unit()
|
block.unit()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_diverge_scope<'a, 'gcx, 'tcx>(_tcx: TyCtxt<'a, 'gcx, 'tcx>,
|
fn build_diverge_scope<'a, 'gcx, 'tcx>(cfg: &mut CFG<'tcx>,
|
||||||
cfg: &mut CFG<'tcx>,
|
|
||||||
span: Span,
|
span: Span,
|
||||||
scope: &mut Scope<'tcx>,
|
scope: &mut Scope<'tcx>,
|
||||||
mut target: BasicBlock)
|
mut target: BasicBlock)
|
||||||
|
Loading…
Reference in New Issue
Block a user