about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2018-10-17 15:27:07 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2018-10-26 23:40:38 +0200
commit26c406945bdfbf21a14c8e1a0bf34c7e2db4cd09 (patch)
tree6b3293cffd3663299e3db9d7e49106284ed54cf0
parent3e6f30ec3e6bda159063fcd126dcb14725fef92d (diff)
downloadrust-26c406945bdfbf21a14c8e1a0bf34c7e2db4cd09.tar.gz
rust-26c406945bdfbf21a14c8e1a0bf34c7e2db4cd09.zip
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.
-rw-r--r--src/librustc/mir/visit.rs6
-rw-r--r--src/librustc_passes/mir_stats.rs3
2 files changed, 3 insertions, 6 deletions
diff --git a/src/librustc/mir/visit.rs b/src/librustc/mir/visit.rs
index 76c76404d2f..1a879ce5f7b 100644
--- a/src/librustc/mir/visit.rs
+++ b/src/librustc/mir/visit.rs
@@ -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 => {
diff --git a/src/librustc_passes/mir_stats.rs b/src/librustc_passes/mir_stats.rs
index 0b9b20d3c45..06c8545aacf 100644
--- a/src/librustc_passes/mir_stats.rs
+++ b/src/librustc_passes/mir_stats.rs
@@ -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) {