@@ -192,6 +192,15 @@ macro_rules! make_mir_visitor {
192192 self . super_constant( constant, location) ;
193193 }
194194
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+
195204 fn visit_span(
196205 & mut self ,
197206 span: $( & $mutability) ? Span ,
@@ -625,8 +634,9 @@ macro_rules! make_mir_visitor {
625634 self . visit_operand( operand, location) ;
626635 }
627636
628- Rvalue :: Repeat ( value, _ ) => {
637+ Rvalue :: Repeat ( value, ct ) => {
629638 self . visit_operand( value, location) ;
639+ self . visit_ty_const( ct, location) ;
630640 }
631641
632642 Rvalue :: ThreadLocalRef ( _) => { }
@@ -878,12 +888,21 @@ macro_rules! make_mir_visitor {
878888 self . visit_span( $( & $mutability) ? * span) ;
879889 drop( user_ty) ; // no visit method for this
880890 match literal {
881- ConstantKind :: Ty ( _ ) => { }
891+ ConstantKind :: Ty ( ct ) => self . visit_ty_const ( ct , location ) ,
882892 ConstantKind :: Val ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
883893 ConstantKind :: Unevaluated ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
884894 }
885895 }
886896
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+
887906 fn super_span( & mut self , _span: $( & $mutability) ? Span ) {
888907 }
889908
0 commit comments