@@ -237,14 +237,6 @@ macro_rules! make_mir_visitor {
237
237
self . super_region( region) ;
238
238
}
239
239
240
- fn visit_const(
241
- & mut self ,
242
- constant: $( & $mutability) ? ty:: Const <' tcx>,
243
- _: Location ,
244
- ) {
245
- self . super_const( constant) ;
246
- }
247
-
248
240
fn visit_substs(
249
241
& mut self ,
250
242
substs: & $( $mutability) ? SubstsRef <' tcx>,
@@ -877,7 +869,7 @@ macro_rules! make_mir_visitor {
877
869
self . visit_span( $( & $mutability) ? * span) ;
878
870
drop( user_ty) ; // no visit method for this
879
871
match literal {
880
- ConstantKind :: Ty ( ct ) => self . visit_const ( $ ( & $mutability ) ? * ct , location ) ,
872
+ ConstantKind :: Ty ( _ ) => { }
881
873
ConstantKind :: Val ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
882
874
ConstantKind :: Unevaluated ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
883
875
}
@@ -917,9 +909,6 @@ macro_rules! make_mir_visitor {
917
909
fn super_region( & mut self , _region: $( & $mutability) ? ty:: Region <' tcx>) {
918
910
}
919
911
920
- fn super_const( & mut self , _const: $( & $mutability) ? ty:: Const <' tcx>) {
921
- }
922
-
923
912
fn super_substs( & mut self , _substs: & $( $mutability) ? SubstsRef <' tcx>) {
924
913
}
925
914
@@ -1088,12 +1077,20 @@ macro_rules! visit_place_fns {
1088
1077
location,
1089
1078
) ;
1090
1079
1091
- if new_local == local { None } else { Some ( PlaceElem :: Index ( new_local) ) }
1080
+ if new_local == local {
1081
+ None
1082
+ } else {
1083
+ Some ( PlaceElem :: Index ( new_local) )
1084
+ }
1092
1085
}
1093
1086
PlaceElem :: Field ( field, ty) => {
1094
1087
let mut new_ty = ty;
1095
1088
self . visit_ty( & mut new_ty, TyContext :: Location ( location) ) ;
1096
- if ty != new_ty { Some ( PlaceElem :: Field ( field, new_ty) ) } else { None }
1089
+ if ty != new_ty {
1090
+ Some ( PlaceElem :: Field ( field, new_ty) )
1091
+ } else {
1092
+ None
1093
+ }
1097
1094
}
1098
1095
PlaceElem :: Deref
1099
1096
| PlaceElem :: ConstantIndex { .. }
0 commit comments