fix rebase fallout
This commit is contained in:
parent
a413242efe
commit
544b3a1bb4
23 changed files with 45 additions and 40 deletions
|
@ -209,7 +209,7 @@ pub(in crate::borrow_check) fn compute_regions<'cx, 'gcx, 'tcx>(
|
||||||
|
|
||||||
fn dump_mir_results<'a, 'gcx, 'tcx>(
|
fn dump_mir_results<'a, 'gcx, 'tcx>(
|
||||||
infcx: &InferCtxt<'a, 'gcx, 'tcx>,
|
infcx: &InferCtxt<'a, 'gcx, 'tcx>,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
regioncx: &RegionInferenceContext<'_>,
|
regioncx: &RegionInferenceContext<'_>,
|
||||||
closure_region_requirements: &Option<ClosureRegionRequirements<'_>>,
|
closure_region_requirements: &Option<ClosureRegionRequirements<'_>>,
|
||||||
|
|
|
@ -2427,7 +2427,12 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
|
||||||
pub struct TypeckMir;
|
pub struct TypeckMir;
|
||||||
|
|
||||||
impl MirPass for TypeckMir {
|
impl MirPass for TypeckMir {
|
||||||
fn run_pass<'a, 'tcx>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, src: MirSource, mir: &mut Mir<'tcx>) {
|
fn run_pass<'a, 'tcx>(
|
||||||
|
&self,
|
||||||
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
|
src: MirSource<'tcx>,
|
||||||
|
mir: &mut Mir<'tcx>,
|
||||||
|
) {
|
||||||
let def_id = src.def_id();
|
let def_id = src.def_id();
|
||||||
debug!("run_pass: {:?}", def_id);
|
debug!("run_pass: {:?}", def_id);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ pub use self::AddCallGuards::*;
|
||||||
impl MirPass for AddCallGuards {
|
impl MirPass for AddCallGuards {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_src: MirSource,
|
_src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
self.add_call_guards(mir);
|
self.add_call_guards(mir);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ pub struct AddMovesForPackedDrops;
|
||||||
impl MirPass for AddMovesForPackedDrops {
|
impl MirPass for AddMovesForPackedDrops {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
src: MirSource,
|
src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>)
|
mir: &mut Mir<'tcx>)
|
||||||
{
|
{
|
||||||
debug!("add_moves_for_packed_drops({:?} @ {:?})", src, mir.span);
|
debug!("add_moves_for_packed_drops({:?} @ {:?})", src, mir.span);
|
||||||
|
|
|
@ -77,7 +77,7 @@ fn may_have_reference<'a, 'gcx, 'tcx>(ty: Ty<'tcx>, tcx: TyCtxt<'a, 'gcx, 'tcx>)
|
||||||
impl MirPass for AddRetag {
|
impl MirPass for AddRetag {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_src: MirSource,
|
_src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>)
|
mir: &mut Mir<'tcx>)
|
||||||
{
|
{
|
||||||
if !tcx.sess.opts.debugging_opts.mir_emit_retag {
|
if !tcx.sess.opts.debugging_opts.mir_emit_retag {
|
||||||
|
|
|
@ -35,7 +35,7 @@ pub struct DeleteAscribeUserType;
|
||||||
impl MirPass for CleanAscribeUserType {
|
impl MirPass for CleanAscribeUserType {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_source: MirSource,
|
_source: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
let mut delete = DeleteAscribeUserType;
|
let mut delete = DeleteAscribeUserType;
|
||||||
delete.visit_mir(mir);
|
delete.visit_mir(mir);
|
||||||
|
@ -69,7 +69,7 @@ pub struct DeleteFakeBorrows {
|
||||||
impl MirPass for CleanFakeReadsAndBorrows {
|
impl MirPass for CleanFakeReadsAndBorrows {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_source: MirSource,
|
_source: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
let mut delete_reads = DeleteAndRecordFakeReads::default();
|
let mut delete_reads = DeleteAndRecordFakeReads::default();
|
||||||
delete_reads.visit_mir(mir);
|
delete_reads.visit_mir(mir);
|
||||||
|
|
|
@ -30,7 +30,7 @@ pub struct CopyPropagation;
|
||||||
impl MirPass for CopyPropagation {
|
impl MirPass for CopyPropagation {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_source: MirSource,
|
_source: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
// We only run when the MIR optimization level is > 1.
|
// We only run when the MIR optimization level is > 1.
|
||||||
// This avoids a slow pass, and messing up debug info.
|
// This avoids a slow pass, and messing up debug info.
|
||||||
|
|
|
@ -8,7 +8,7 @@ pub struct Deaggregator;
|
||||||
impl MirPass for Deaggregator {
|
impl MirPass for Deaggregator {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_source: MirSource,
|
_source: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
let (basic_blocks, local_decls) = mir.basic_blocks_and_local_decls_mut();
|
let (basic_blocks, local_decls) = mir.basic_blocks_and_local_decls_mut();
|
||||||
let local_decls = &*local_decls;
|
let local_decls = &*local_decls;
|
||||||
|
|
|
@ -20,7 +20,7 @@ impl MirPass for Marker {
|
||||||
|
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_source: MirSource,
|
_source: MirSource<'tcx>,
|
||||||
_mir: &mut Mir<'tcx>)
|
_mir: &mut Mir<'tcx>)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ impl fmt::Display for Disambiguator {
|
||||||
pub fn on_mir_pass<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
pub fn on_mir_pass<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
pass_num: &dyn fmt::Display,
|
pass_num: &dyn fmt::Display,
|
||||||
pass_name: &str,
|
pass_name: &str,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
is_after: bool) {
|
is_after: bool) {
|
||||||
if mir_util::dump_enabled(tcx, pass_name, source) {
|
if mir_util::dump_enabled(tcx, pass_name, source) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ pub struct ElaborateDrops;
|
||||||
impl MirPass for ElaborateDrops {
|
impl MirPass for ElaborateDrops {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
src: MirSource,
|
src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>)
|
mir: &mut Mir<'tcx>)
|
||||||
{
|
{
|
||||||
debug!("elaborate_drops({:?} @ {:?})", src, mir.span);
|
debug!("elaborate_drops({:?} @ {:?})", src, mir.span);
|
||||||
|
|
|
@ -53,7 +53,7 @@ pub struct EraseRegions;
|
||||||
impl MirPass for EraseRegions {
|
impl MirPass for EraseRegions {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_: MirSource,
|
_: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
EraseRegionsVisitor::new(tcx).visit_mir(mir);
|
EraseRegionsVisitor::new(tcx).visit_mir(mir);
|
||||||
}
|
}
|
||||||
|
|
|
@ -376,7 +376,7 @@ impl<'tcx> Visitor<'tcx> for StorageIgnored {
|
||||||
fn locals_live_across_suspend_points(
|
fn locals_live_across_suspend_points(
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
movable: bool,
|
movable: bool,
|
||||||
) -> (
|
) -> (
|
||||||
liveness::LiveVarSet<Local>,
|
liveness::LiveVarSet<Local>,
|
||||||
|
@ -484,7 +484,7 @@ fn locals_live_across_suspend_points(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn compute_layout<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
fn compute_layout<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
upvars: Vec<Ty<'tcx>>,
|
upvars: Vec<Ty<'tcx>>,
|
||||||
interior: Ty<'tcx>,
|
interior: Ty<'tcx>,
|
||||||
movable: bool,
|
movable: bool,
|
||||||
|
@ -635,7 +635,7 @@ fn create_generator_drop_shim<'a, 'tcx>(
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
transform: &TransformVisitor<'a, 'tcx>,
|
transform: &TransformVisitor<'a, 'tcx>,
|
||||||
def_id: DefId,
|
def_id: DefId,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
gen_ty: Ty<'tcx>,
|
gen_ty: Ty<'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
drop_clean: BasicBlock) -> Mir<'tcx> {
|
drop_clean: BasicBlock) -> Mir<'tcx> {
|
||||||
|
@ -758,7 +758,7 @@ fn create_generator_resume_function<'a, 'tcx>(
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
transform: TransformVisitor<'a, 'tcx>,
|
transform: TransformVisitor<'a, 'tcx>,
|
||||||
def_id: DefId,
|
def_id: DefId,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
// Poison the generator when it unwinds
|
// Poison the generator when it unwinds
|
||||||
for block in mir.basic_blocks_mut() {
|
for block in mir.basic_blocks_mut() {
|
||||||
|
@ -869,7 +869,7 @@ fn create_cases<'a, 'tcx, F>(mir: &mut Mir<'tcx>,
|
||||||
impl MirPass for StateTransform {
|
impl MirPass for StateTransform {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
let yield_ty = if let Some(yield_ty) = mir.yield_ty {
|
let yield_ty = if let Some(yield_ty) = mir.yield_ty {
|
||||||
yield_ty
|
yield_ty
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub struct InstCombine;
|
||||||
impl MirPass for InstCombine {
|
impl MirPass for InstCombine {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_: MirSource,
|
_: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
// We only run when optimizing MIR (at any level).
|
// We only run when optimizing MIR (at any level).
|
||||||
if tcx.sess.opts.debugging_opts.mir_opt_level == 0 {
|
if tcx.sess.opts.debugging_opts.mir_opt_level == 0 {
|
||||||
|
|
|
@ -12,7 +12,7 @@ pub struct Lower128Bit;
|
||||||
impl MirPass for Lower128Bit {
|
impl MirPass for Lower128Bit {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_src: MirSource,
|
_src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
let debugging_override = tcx.sess.opts.debugging_opts.lower_128bit_ops;
|
let debugging_override = tcx.sess.opts.debugging_opts.lower_128bit_ops;
|
||||||
let target_default = tcx.sess.host.options.i128_lowering;
|
let target_default = tcx.sess.host.options.i128_lowering;
|
||||||
|
|
|
@ -11,7 +11,7 @@ pub struct NoLandingPads;
|
||||||
impl MirPass for NoLandingPads {
|
impl MirPass for NoLandingPads {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_: MirSource,
|
_: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
no_landing_pads(tcx, mir)
|
no_landing_pads(tcx, mir)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1159,7 +1159,7 @@ pub struct QualifyAndPromoteConstants;
|
||||||
impl MirPass for QualifyAndPromoteConstants {
|
impl MirPass for QualifyAndPromoteConstants {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
src: MirSource,
|
src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
// There's not really any point in promoting errorful MIR.
|
// There's not really any point in promoting errorful MIR.
|
||||||
if mir.return_ty().references_error() {
|
if mir.return_ty().references_error() {
|
||||||
|
|
|
@ -24,7 +24,7 @@ pub fn remove_noop_landing_pads<'a, 'tcx>(
|
||||||
impl MirPass for RemoveNoopLandingPads {
|
impl MirPass for RemoveNoopLandingPads {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_src: MirSource,
|
_src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
remove_noop_landing_pads(tcx, mir);
|
remove_noop_landing_pads(tcx, mir);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ pub struct SanityCheck;
|
||||||
|
|
||||||
impl MirPass for SanityCheck {
|
impl MirPass for SanityCheck {
|
||||||
fn run_pass<'a, 'tcx>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
fn run_pass<'a, 'tcx>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
src: MirSource, mir: &mut Mir<'tcx>) {
|
src: MirSource<'tcx>, mir: &mut Mir<'tcx>) {
|
||||||
let def_id = src.def_id();
|
let def_id = src.def_id();
|
||||||
let id = tcx.hir().as_local_node_id(def_id).unwrap();
|
let id = tcx.hir().as_local_node_id(def_id).unwrap();
|
||||||
if !tcx.has_attr(def_id, "rustc_mir") {
|
if !tcx.has_attr(def_id, "rustc_mir") {
|
||||||
|
|
|
@ -59,7 +59,7 @@ impl MirPass for SimplifyCfg {
|
||||||
|
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
_tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_src: MirSource,
|
_src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
debug!("SimplifyCfg({:?}) - simplifying {:?}", self.label, mir);
|
debug!("SimplifyCfg({:?}) - simplifying {:?}", self.label, mir);
|
||||||
simplify_cfg(mir);
|
simplify_cfg(mir);
|
||||||
|
@ -298,7 +298,7 @@ pub struct SimplifyLocals;
|
||||||
impl MirPass for SimplifyLocals {
|
impl MirPass for SimplifyLocals {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_: MirSource,
|
_: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
let mut marker = DeclMarker { locals: BitSet::new_empty(mir.local_decls.len()) };
|
let mut marker = DeclMarker { locals: BitSet::new_empty(mir.local_decls.len()) };
|
||||||
marker.visit_mir(mir);
|
marker.visit_mir(mir);
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl MirPass for SimplifyBranches {
|
||||||
|
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_src: MirSource,
|
_src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
for block in mir.basic_blocks_mut() {
|
for block in mir.basic_blocks_mut() {
|
||||||
let terminator = block.terminator_mut();
|
let terminator = block.terminator_mut();
|
||||||
|
|
|
@ -39,7 +39,7 @@ pub struct UniformArrayMoveOut;
|
||||||
impl MirPass for UniformArrayMoveOut {
|
impl MirPass for UniformArrayMoveOut {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_src: MirSource,
|
_src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
let mut patch = MirPatch::new(mir);
|
let mut patch = MirPatch::new(mir);
|
||||||
{
|
{
|
||||||
|
@ -161,7 +161,7 @@ pub struct RestoreSubsliceArrayMoveOut;
|
||||||
impl MirPass for RestoreSubsliceArrayMoveOut {
|
impl MirPass for RestoreSubsliceArrayMoveOut {
|
||||||
fn run_pass<'a, 'tcx>(&self,
|
fn run_pass<'a, 'tcx>(&self,
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
_src: MirSource,
|
_src: MirSource<'tcx>,
|
||||||
mir: &mut Mir<'tcx>) {
|
mir: &mut Mir<'tcx>) {
|
||||||
let mut patch = MirPatch::new(mir);
|
let mut patch = MirPatch::new(mir);
|
||||||
{
|
{
|
||||||
|
|
|
@ -307,7 +307,7 @@ fn block<'tcx, V: Idx>(
|
||||||
pub fn dump_mir<'a, 'tcx, V: Idx>(
|
pub fn dump_mir<'a, 'tcx, V: Idx>(
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
pass_name: &str,
|
pass_name: &str,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
map: &impl LiveVariableMap<LiveVar = V>,
|
map: &impl LiveVariableMap<LiveVar = V>,
|
||||||
result: &LivenessResult<V>,
|
result: &LivenessResult<V>,
|
||||||
|
@ -326,7 +326,7 @@ fn dump_matched_mir_node<'a, 'tcx, V: Idx>(
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
pass_name: &str,
|
pass_name: &str,
|
||||||
node_path: &str,
|
node_path: &str,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
map: &dyn LiveVariableMap<LiveVar = V>,
|
map: &dyn LiveVariableMap<LiveVar = V>,
|
||||||
result: &LivenessResult<V>,
|
result: &LivenessResult<V>,
|
||||||
|
@ -348,7 +348,7 @@ fn dump_matched_mir_node<'a, 'tcx, V: Idx>(
|
||||||
|
|
||||||
pub fn write_mir_fn<'a, 'tcx, V: Idx>(
|
pub fn write_mir_fn<'a, 'tcx, V: Idx>(
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
src: MirSource,
|
src: MirSource<'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
map: &dyn LiveVariableMap<LiveVar = V>,
|
map: &dyn LiveVariableMap<LiveVar = V>,
|
||||||
w: &mut dyn Write,
|
w: &mut dyn Write,
|
||||||
|
|
|
@ -68,7 +68,7 @@ pub fn dump_mir<'a, 'gcx, 'tcx, F>(
|
||||||
pass_num: Option<&dyn Display>,
|
pass_num: Option<&dyn Display>,
|
||||||
pass_name: &str,
|
pass_name: &str,
|
||||||
disambiguator: &dyn Display,
|
disambiguator: &dyn Display,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
extra_data: F,
|
extra_data: F,
|
||||||
) where
|
) where
|
||||||
|
@ -97,7 +97,7 @@ pub fn dump_mir<'a, 'gcx, 'tcx, F>(
|
||||||
pub fn dump_enabled<'a, 'gcx, 'tcx>(
|
pub fn dump_enabled<'a, 'gcx, 'tcx>(
|
||||||
tcx: TyCtxt<'a, 'gcx, 'tcx>,
|
tcx: TyCtxt<'a, 'gcx, 'tcx>,
|
||||||
pass_name: &str,
|
pass_name: &str,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let filters = match tcx.sess.opts.debugging_opts.dump_mir {
|
let filters = match tcx.sess.opts.debugging_opts.dump_mir {
|
||||||
None => return false,
|
None => return false,
|
||||||
|
@ -124,7 +124,7 @@ fn dump_matched_mir_node<'a, 'gcx, 'tcx, F>(
|
||||||
pass_name: &str,
|
pass_name: &str,
|
||||||
node_path: &str,
|
node_path: &str,
|
||||||
disambiguator: &dyn Display,
|
disambiguator: &dyn Display,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
mut extra_data: F,
|
mut extra_data: F,
|
||||||
) where
|
) where
|
||||||
|
@ -164,7 +164,7 @@ fn dump_path(
|
||||||
pass_num: Option<&dyn Display>,
|
pass_num: Option<&dyn Display>,
|
||||||
pass_name: &str,
|
pass_name: &str,
|
||||||
disambiguator: &dyn Display,
|
disambiguator: &dyn Display,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
) -> PathBuf {
|
) -> PathBuf {
|
||||||
let promotion_id = match source.promoted {
|
let promotion_id = match source.promoted {
|
||||||
Some(id) => format!("-{:?}", id),
|
Some(id) => format!("-{:?}", id),
|
||||||
|
@ -231,7 +231,7 @@ pub(crate) fn create_dump_file(
|
||||||
pass_num: Option<&dyn Display>,
|
pass_num: Option<&dyn Display>,
|
||||||
pass_name: &str,
|
pass_name: &str,
|
||||||
disambiguator: &dyn Display,
|
disambiguator: &dyn Display,
|
||||||
source: MirSource,
|
source: MirSource<'tcx>,
|
||||||
) -> io::Result<fs::File> {
|
) -> io::Result<fs::File> {
|
||||||
let file_path = dump_path(tcx, extension, pass_num, pass_name, disambiguator, source);
|
let file_path = dump_path(tcx, extension, pass_num, pass_name, disambiguator, source);
|
||||||
if let Some(parent) = file_path.parent() {
|
if let Some(parent) = file_path.parent() {
|
||||||
|
@ -282,7 +282,7 @@ pub fn write_mir_pretty<'a, 'gcx, 'tcx>(
|
||||||
|
|
||||||
pub fn write_mir_fn<'a, 'gcx, 'tcx, F>(
|
pub fn write_mir_fn<'a, 'gcx, 'tcx, F>(
|
||||||
tcx: TyCtxt<'a, 'gcx, 'tcx>,
|
tcx: TyCtxt<'a, 'gcx, 'tcx>,
|
||||||
src: MirSource,
|
src: MirSource<'tcx>,
|
||||||
mir: &Mir<'tcx>,
|
mir: &Mir<'tcx>,
|
||||||
extra_data: &mut F,
|
extra_data: &mut F,
|
||||||
w: &mut dyn Write,
|
w: &mut dyn Write,
|
||||||
|
@ -546,7 +546,7 @@ fn write_scope_tree(
|
||||||
/// local variables (both user-defined bindings and compiler temporaries).
|
/// local variables (both user-defined bindings and compiler temporaries).
|
||||||
pub fn write_mir_intro<'a, 'gcx, 'tcx>(
|
pub fn write_mir_intro<'a, 'gcx, 'tcx>(
|
||||||
tcx: TyCtxt<'a, 'gcx, 'tcx>,
|
tcx: TyCtxt<'a, 'gcx, 'tcx>,
|
||||||
src: MirSource,
|
src: MirSource<'tcx>,
|
||||||
mir: &Mir<'_>,
|
mir: &Mir<'_>,
|
||||||
w: &mut dyn Write,
|
w: &mut dyn Write,
|
||||||
) -> io::Result<()> {
|
) -> io::Result<()> {
|
||||||
|
@ -588,7 +588,7 @@ pub fn write_mir_intro<'a, 'gcx, 'tcx>(
|
||||||
|
|
||||||
fn write_mir_sig(
|
fn write_mir_sig(
|
||||||
tcx: TyCtxt<'_, '_, '_>,
|
tcx: TyCtxt<'_, '_, '_>,
|
||||||
src: MirSource,
|
src: MirSource<'tcx>,
|
||||||
mir: &Mir<'_>,
|
mir: &Mir<'_>,
|
||||||
w: &mut dyn Write,
|
w: &mut dyn Write,
|
||||||
) -> io::Result<()> {
|
) -> io::Result<()> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue