mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-29 03:37:26 +03:00
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:
@@ -157,20 +157,7 @@ fn process_place(
|
||||
);
|
||||
}
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user