@@ -12,13 +12,13 @@ use super::ty::{
1212
1313pub trait Folder : Sized {
1414 type Break ;
15- fn visit_ty ( & mut self , ty : & Ty ) -> ControlFlow < Self :: Break , Ty > {
15+ fn fold_ty ( & mut self , ty : & Ty ) -> ControlFlow < Self :: Break , Ty > {
1616 ty. super_fold ( self )
1717 }
1818 fn fold_const ( & mut self , c : & Const ) -> ControlFlow < Self :: Break , Const > {
1919 c. super_fold ( self )
2020 }
21- fn visit_reg ( & mut self , reg : & Region ) -> ControlFlow < Self :: Break , Region > {
21+ fn fold_reg ( & mut self , reg : & Region ) -> ControlFlow < Self :: Break , Region > {
2222 reg. super_fold ( self )
2323 }
2424}
@@ -32,7 +32,7 @@ pub trait Foldable: Sized + Clone {
3232
3333impl Foldable for Ty {
3434 fn fold < V : Folder > ( & self , folder : & mut V ) -> ControlFlow < V :: Break , Self > {
35- folder. visit_ty ( self )
35+ folder. fold_ty ( self )
3636 }
3737 fn super_fold < V : Folder > ( & self , folder : & mut V ) -> ControlFlow < V :: Break , Self > {
3838 let mut kind = self . kind ( ) ;
@@ -114,7 +114,7 @@ impl Foldable for GenericArgs {
114114
115115impl Foldable for Region {
116116 fn fold < V : Folder > ( & self , folder : & mut V ) -> ControlFlow < V :: Break , Self > {
117- folder. visit_reg ( self )
117+ folder. fold_reg ( self )
118118 }
119119 fn super_fold < V : Folder > ( & self , folder : & mut V ) -> ControlFlow < V :: Break , Self > {
120120 let mut kind = self . kind . clone ( ) ;
@@ -257,7 +257,7 @@ pub enum Never {}
257257impl Folder for GenericArgs {
258258 type Break = Never ;
259259
260- fn visit_ty ( & mut self , ty : & Ty ) -> ControlFlow < Self :: Break , Ty > {
260+ fn fold_ty ( & mut self , ty : & Ty ) -> ControlFlow < Self :: Break , Ty > {
261261 ControlFlow :: Continue ( match ty. kind ( ) {
262262 TyKind :: Param ( p) => self [ p] ,
263263 _ => * ty,
0 commit comments