@@ -192,10 +192,9 @@ macro_rules! make_mir_visitor {
192
192
self . super_constant( constant, location) ;
193
193
}
194
194
195
- #[ allow( rustc:: pass_by_value) ]
196
195
fn visit_ty_const(
197
196
& mut self ,
198
- ct: & $ ( $mutability) ? ty:: Const <' tcx>,
197
+ ct: $ ( & $mutability) ? ty:: Const <' tcx>,
199
198
location: Location ,
200
199
) {
201
200
self . super_ty_const( ct, location) ;
@@ -636,7 +635,7 @@ macro_rules! make_mir_visitor {
636
635
637
636
Rvalue :: Repeat ( value, ct) => {
638
637
self . visit_operand( value, location) ;
639
- self . visit_ty_const( ct, location) ;
638
+ self . visit_ty_const( $ ( & $mutability ) ? * ct, location) ;
640
639
}
641
640
642
641
Rvalue :: ThreadLocalRef ( _) => { }
@@ -888,16 +887,15 @@ macro_rules! make_mir_visitor {
888
887
self . visit_span( $( & $mutability) ? * span) ;
889
888
drop( user_ty) ; // no visit method for this
890
889
match literal {
891
- ConstantKind :: Ty ( ct) => self . visit_ty_const( ct, location) ,
890
+ ConstantKind :: Ty ( ct) => self . visit_ty_const( $ ( & $mutability ) ? * ct, location) ,
892
891
ConstantKind :: Val ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
893
892
ConstantKind :: Unevaluated ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
894
893
}
895
894
}
896
895
897
- #[ allow( rustc:: pass_by_value) ]
898
896
fn super_ty_const(
899
897
& mut self ,
900
- _ct: & $ ( $mutability) ? ty:: Const <' tcx>,
898
+ _ct: $ ( & $mutability) ? ty:: Const <' tcx>,
901
899
_location: Location ,
902
900
) {
903
901
0 commit comments