Remove check for projections in a branch without any
The else branch is taken when projection slice is empty so everything except for the call to the `visit_local` is a dead code.
This commit is contained in:
parent
59b6583287
commit
624c693508
1 changed files with 0 additions and 13 deletions
|
@ -157,20 +157,7 @@ impl<Bx: BuilderMethods<'a, 'tcx>> LocalAnalyzer<'mir, 'a, 'tcx, Bx> {
|
|||
);
|
||||
}
|
||||
} else {
|
||||
// FIXME this is super_place code, is repeated here to avoid cloning place or changing
|
||||
// visit_place API
|
||||
let mut context = context;
|
||||
|
||||
if !place_ref.projection.is_empty() {
|
||||
context = if context.is_mutating_use() {
|
||||
PlaceContext::MutatingUse(MutatingUseContext::Projection)
|
||||
} else {
|
||||
PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection)
|
||||
};
|
||||
}
|
||||
|
||||
self.visit_local(&place_ref.local, context, location);
|
||||
self.visit_projection(*place_ref, context, location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue