@@ -237,14 +237,6 @@ macro_rules! make_mir_visitor {
237237 self . super_region( region) ;
238238 }
239239
240- fn visit_const(
241- & mut self ,
242- constant: $( & $mutability) ? ty:: Const <' tcx>,
243- _: Location ,
244- ) {
245- self . super_const( constant) ;
246- }
247-
248240 fn visit_substs(
249241 & mut self ,
250242 substs: & $( $mutability) ? SubstsRef <' tcx>,
@@ -877,7 +869,7 @@ macro_rules! make_mir_visitor {
877869 self . visit_span( $( & $mutability) ? * span) ;
878870 drop( user_ty) ; // no visit method for this
879871 match literal {
880- ConstantKind :: Ty ( ct ) => self . visit_const ( $ ( & $mutability ) ? * ct , location ) ,
872+ ConstantKind :: Ty ( _ ) => { }
881873 ConstantKind :: Val ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
882874 ConstantKind :: Unevaluated ( _, ty) => self . visit_ty( $( & $mutability) ? * ty, TyContext :: Location ( location) ) ,
883875 }
@@ -917,9 +909,6 @@ macro_rules! make_mir_visitor {
917909 fn super_region( & mut self , _region: $( & $mutability) ? ty:: Region <' tcx>) {
918910 }
919911
920- fn super_const( & mut self , _const: $( & $mutability) ? ty:: Const <' tcx>) {
921- }
922-
923912 fn super_substs( & mut self , _substs: & $( $mutability) ? SubstsRef <' tcx>) {
924913 }
925914
@@ -1088,12 +1077,20 @@ macro_rules! visit_place_fns {
10881077 location,
10891078 ) ;
10901079
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+ }
10921085 }
10931086 PlaceElem :: Field ( field, ty) => {
10941087 let mut new_ty = ty;
10951088 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+ }
10971094 }
10981095 PlaceElem :: Deref
10991096 | PlaceElem :: ConstantIndex { .. }
0 commit comments