Skip to content

Commit 26c4069

Browse files
committed
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.
1 parent 3e6f30e commit 26c4069

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/librustc/mir/visit.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,8 @@ macro_rules! make_mir_visitor {
175175

176176
fn visit_projection_elem(&mut self,
177177
place: & $($mutability)* PlaceElem<'tcx>,
178-
context: PlaceContext<'tcx>,
179178
location: Location) {
180-
self.super_projection_elem(place, context, location);
179+
self.super_projection_elem(place, location);
181180
}
182181

183182
fn visit_branch(&mut self,
@@ -692,12 +691,11 @@ macro_rules! make_mir_visitor {
692691
PlaceContext::Projection(Mutability::Not)
693692
};
694693
self.visit_place(base, context, location);
695-
self.visit_projection_elem(elem, context, location);
694+
self.visit_projection_elem(elem, location);
696695
}
697696

698697
fn super_projection_elem(&mut self,
699698
proj: & $($mutability)* PlaceElem<'tcx>,
700-
_context: PlaceContext<'tcx>,
701699
location: Location) {
702700
match *proj {
703701
ProjectionElem::Deref => {

src/librustc_passes/mir_stats.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ impl<'a, 'tcx> mir_visit::Visitor<'tcx> for StatCollector<'a, 'tcx> {
211211

212212
fn visit_projection_elem(&mut self,
213213
place: &PlaceElem<'tcx>,
214-
context: mir_visit::PlaceContext<'tcx>,
215214
location: Location) {
216215
self.record("PlaceElem", place);
217216
self.record(match *place {
@@ -222,7 +221,7 @@ impl<'a, 'tcx> mir_visit::Visitor<'tcx> for StatCollector<'a, 'tcx> {
222221
ProjectionElem::ConstantIndex { .. } => "PlaceElem::ConstantIndex",
223222
ProjectionElem::Downcast(..) => "PlaceElem::Downcast",
224223
}, place);
225-
self.super_projection_elem(place, context, location);
224+
self.super_projection_elem(place, location);
226225
}
227226

228227
fn visit_constant(&mut self, constant: &Constant<'tcx>, location: Location) {

0 commit comments

Comments
 (0)