Remove in_band_lifetimes
from rustc_mir_transform
This one is a heavy `'tcx` user. Two interesting ones: This one had the `'tcx` declared on the function, despite the trait taking a `'tcx`: ```diff -impl Visitor<'_> for UsedLocals { +impl<'tcx> Visitor<'tcx> for UsedLocals { fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) { ``` This one use in-band for one, and underscore for the other: ```diff -pub fn remove_dead_blocks(tcx: TyCtxt<'tcx>, body: &mut Body<'_>) { +pub fn remove_dead_blocks<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { ```
This commit is contained in:
parent
0b6f079e49
commit
a124924061
35 changed files with 117 additions and 119 deletions
|
@ -28,7 +28,7 @@ pub trait MirLint<'tcx> {
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct Lint<T>(pub T);
|
||||
|
||||
impl<T> MirPass<'tcx> for Lint<T>
|
||||
impl<'tcx, T> MirPass<'tcx> for Lint<T>
|
||||
where
|
||||
T: MirLint<'tcx>,
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ where
|
|||
|
||||
pub struct WithMinOptLevel<T>(pub u32, pub T);
|
||||
|
||||
impl<T> MirPass<'tcx> for WithMinOptLevel<T>
|
||||
impl<'tcx, T> MirPass<'tcx> for WithMinOptLevel<T>
|
||||
where
|
||||
T: MirPass<'tcx>,
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub fn run_passes(tcx: TyCtxt<'tcx>, body: &'mir mut Body<'tcx>, passes: &[&dyn MirPass<'tcx>]) {
|
||||
pub fn run_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>, passes: &[&dyn MirPass<'tcx>]) {
|
||||
let start_phase = body.phase;
|
||||
let mut cnt = 0;
|
||||
|
||||
|
@ -119,11 +119,11 @@ pub fn run_passes(tcx: TyCtxt<'tcx>, body: &'mir mut Body<'tcx>, passes: &[&dyn
|
|||
}
|
||||
}
|
||||
|
||||
pub fn validate_body(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>, when: String) {
|
||||
pub fn validate_body<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>, when: String) {
|
||||
validate::Validator { when, mir_phase: body.phase }.run_pass(tcx, body);
|
||||
}
|
||||
|
||||
pub fn dump_mir(
|
||||
pub fn dump_mir<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
body: &Body<'tcx>,
|
||||
phase: MirPhase,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue