@@ -156,6 +156,15 @@ macro_rules! make_mir_visitor {
156
156
self . super_place( place, context, location) ;
157
157
}
158
158
159
+ fn visit_neoplace(
160
+ & mut self ,
161
+ place: & $( $mutability) * NeoPlace <' tcx>,
162
+ context: PlaceContext <' tcx>,
163
+ location: Location ,
164
+ ) {
165
+ self . super_neoplace( place, context, location) ;
166
+ }
167
+
159
168
fn visit_static( & mut self ,
160
169
static_: & $( $mutability) * Static <' tcx>,
161
170
context: PlaceContext <' tcx>,
@@ -752,6 +761,40 @@ macro_rules! make_mir_visitor {
752
761
}
753
762
}
754
763
764
+ fn super_neoplace(
765
+ & mut self ,
766
+ place: & $( $mutability) * NeoPlace <' tcx>,
767
+ context: PlaceContext <' tcx>,
768
+ location: Location ,
769
+ ) {
770
+ let NeoPlace {
771
+ base,
772
+ elems,
773
+ } = place;
774
+
775
+ match base {
776
+ PlaceBase :: Local ( local) => {
777
+ self . visit_local( local, context, location) ;
778
+ }
779
+ PlaceBase :: Static ( static_) => {
780
+ self . visit_static( static_, context, location) ;
781
+ }
782
+ PlaceBase :: Promoted ( promoted) => {
783
+ self . visit_ty( & $( $mutability) * promoted. 1 , TyContext :: Location ( location) ) ;
784
+ }
785
+ }
786
+
787
+ if !elems. is_empty( ) {
788
+ for elem in elems. iter( ) . cloned( ) . rev( ) {
789
+ self . visit_projection_elem(
790
+ & $( $mutability) * elem. clone( ) ,
791
+ context,
792
+ location
793
+ ) ;
794
+ }
795
+ }
796
+ }
797
+
755
798
fn super_static( & mut self ,
756
799
static_: & $( $mutability) * Static <' tcx>,
757
800
_context: PlaceContext <' tcx>,
0 commit comments