Remove PlaceContext from API of mir::Visitor::visit_projection_elem.

It is unused, and would not make sense to maintain in the commits later in this PR.
This commit is contained in:
Felix S. Klock II 2018-10-17 15:27:07 +02:00
parent 3e6f30ec3e
commit 26c406945b
2 changed files with 3 additions and 6 deletions

View file

@ -175,9 +175,8 @@ macro_rules! make_mir_visitor {
fn visit_projection_elem(&mut self,
place: & $($mutability)* PlaceElem<'tcx>,
context: PlaceContext<'tcx>,
location: Location) {
self.super_projection_elem(place, context, location);
self.super_projection_elem(place, location);
}
fn visit_branch(&mut self,
@ -692,12 +691,11 @@ macro_rules! make_mir_visitor {
PlaceContext::Projection(Mutability::Not)
};
self.visit_place(base, context, location);
self.visit_projection_elem(elem, context, location);
self.visit_projection_elem(elem, location);
}
fn super_projection_elem(&mut self,
proj: & $($mutability)* PlaceElem<'tcx>,
_context: PlaceContext<'tcx>,
location: Location) {
match *proj {
ProjectionElem::Deref => {

View file

@ -211,7 +211,6 @@ impl<'a, 'tcx> mir_visit::Visitor<'tcx> for StatCollector<'a, 'tcx> {
fn visit_projection_elem(&mut self,
place: &PlaceElem<'tcx>,
context: mir_visit::PlaceContext<'tcx>,
location: Location) {
self.record("PlaceElem", place);
self.record(match *place {
@ -222,7 +221,7 @@ impl<'a, 'tcx> mir_visit::Visitor<'tcx> for StatCollector<'a, 'tcx> {
ProjectionElem::ConstantIndex { .. } => "PlaceElem::ConstantIndex",
ProjectionElem::Downcast(..) => "PlaceElem::Downcast",
}, place);
self.super_projection_elem(place, context, location);
self.super_projection_elem(place, location);
}
fn visit_constant(&mut self, constant: &Constant<'tcx>, location: Location) {