@@ -192,6 +192,15 @@ macro_rules! make_mir_visitor {
192
192
self . super_constant( constant, location) ;
193
193
}
194
194
195
+ #[ allow( rustc:: pass_by_value) ]
196
+ fn visit_ty_const(
197
+ & mut self ,
198
+ ct: & $( $mutability) ? ty:: Const <' tcx>,
199
+ location: Location ,
200
+ ) {
201
+ self . super_ty_const( ct, location) ;
202
+ }
203
+
195
204
fn visit_span(
196
205
& mut self ,
197
206
span: $( & $mutability) ? Span ,
@@ -625,8 +634,9 @@ macro_rules! make_mir_visitor {
625
634
self . visit_operand( operand, location) ;
626
635
}
627
636
628
- Rvalue :: Repeat ( value, _ ) => {
637
+ Rvalue :: Repeat ( value, ct ) => {
629
638
self . visit_operand( value, location) ;
639
+ self . visit_ty_const( ct, location) ;
630
640
}
631
641
632
642
Rvalue :: ThreadLocalRef ( _) => { }
@@ -878,12 +888,21 @@ macro_rules! make_mir_visitor {
878
888
self . visit_span( $( & $mutability) ? * span) ;
879
889
drop( user_ty) ; // no visit method for this
880
890
match literal {
881
- ConstantKind :: Ty ( _ ) => { }
891
+ ConstantKind :: Ty ( ct ) => self . visit_ty_const ( ct , location ) ,
882
892
ConstantKind :: Val ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
883
893
ConstantKind :: Unevaluated ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
884
894
}
885
895
}
886
896
897
+ #[ allow( rustc:: pass_by_value) ]
898
+ fn super_ty_const(
899
+ & mut self ,
900
+ _ct: & $( $mutability) ? ty:: Const <' tcx>,
901
+ _location: Location ,
902
+ ) {
903
+
904
+ }
905
+
887
906
fn super_span( & mut self , _span: $( & $mutability) ? Span ) {
888
907
}
889
908
0 commit comments