Rename some lifetimes.
`'mir` is not a good lifetime name in `LocalAnalyzer`, because it's used on two unrelated fields. `'a` is more standard for a situation like this (e.g. #130022).
This commit is contained in:
parent
ae1f092307
commit
3ec2f121cc
1 changed files with 5 additions and 7 deletions
|
@ -69,13 +69,13 @@ enum LocalKind {
|
||||||
SSA(DefLocation),
|
SSA(DefLocation),
|
||||||
}
|
}
|
||||||
|
|
||||||
struct LocalAnalyzer<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> {
|
struct LocalAnalyzer<'a, 'b, 'tcx, Bx: BuilderMethods<'b, 'tcx>> {
|
||||||
fx: &'mir FunctionCx<'a, 'tcx, Bx>,
|
fx: &'a FunctionCx<'b, 'tcx, Bx>,
|
||||||
dominators: &'mir Dominators<mir::BasicBlock>,
|
dominators: &'a Dominators<mir::BasicBlock>,
|
||||||
locals: IndexVec<mir::Local, LocalKind>,
|
locals: IndexVec<mir::Local, LocalKind>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> LocalAnalyzer<'mir, 'a, 'tcx, Bx> {
|
impl<'a, 'b, 'tcx, Bx: BuilderMethods<'b, 'tcx>> LocalAnalyzer<'a, 'b, 'tcx, Bx> {
|
||||||
fn define(&mut self, local: mir::Local, location: DefLocation) {
|
fn define(&mut self, local: mir::Local, location: DefLocation) {
|
||||||
let kind = &mut self.locals[local];
|
let kind = &mut self.locals[local];
|
||||||
match *kind {
|
match *kind {
|
||||||
|
@ -152,9 +152,7 @@ impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> LocalAnalyzer<'mir, 'a, 'tcx,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> Visitor<'tcx>
|
impl<'a, 'b, 'tcx, Bx: BuilderMethods<'b, 'tcx>> Visitor<'tcx> for LocalAnalyzer<'a, 'b, 'tcx, Bx> {
|
||||||
for LocalAnalyzer<'mir, 'a, 'tcx, Bx>
|
|
||||||
{
|
|
||||||
fn visit_assign(
|
fn visit_assign(
|
||||||
&mut self,
|
&mut self,
|
||||||
place: &mir::Place<'tcx>,
|
place: &mir::Place<'tcx>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue