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