@@ -29,7 +29,7 @@ folder can substitute a new type in its place.
2929A common use for ` TypeFoldable ` is to permit a substitution -- that is,
3030replacing generic type parameters with their values.
3131
32- ## From TypeFoldable to Folder to SuperFold and back again
32+ ## From TypeFoldable to Folder to TypeSuperFoldable and back again
3333
3434The overall flow of folding is like this.
3535
@@ -39,7 +39,7 @@ The overall flow of folding is like this.
3939 callbacks in the [ ` Folder ` ] trait, invoking [ ` TypeFoldable::fold_with ` ] will in turn
4040 invoke the corresponding method on the [ ` Folder ` ] trait, such as ` Folder::fold_ty ` .
41413 . The default implementation of ` Folder::fold_ty ` , in turn, invokes
42- ` SuperFold ::super_fold_with` . This will recursively fold the
42+ ` TypeSuperFoldable ::super_fold_with` . This will recursively fold the
4343 contents of the type. In some cases, the ` super_fold_with `
4444 implementation invokes more specialized methods on [ ` Folder ` ] , such
4545 as [ ` Folder::fold_free_var_ty ` ] , which makes it easier to write
@@ -53,7 +53,7 @@ Thus, as a user, you can customize folding by:
5353* Implementing the appropriate methods to "intercept" types/lifetimes/etc at the right level of
5454 detail
5555* In those methods, if you find a case where you would prefer not to
56- substitute a new value, then invoke ` SuperFold ::super_fold_with` to
56+ substitute a new value, then invoke ` TypeSuperFoldable ::super_fold_with` to
5757 return to the default behavior.
5858
5959## The ` binders ` argument
@@ -77,21 +77,21 @@ type that will result from folding.
7777
7878[ `Result` ] : https://rust-lang.github.io/chalk/chalk_ir/fold/trait.TypeFoldable.html#associatedtype.Result
7979
80- ## When to implement the TypeFoldable and SuperFold traits
80+ ## When to implement the TypeFoldable and TypeSuperFoldable traits
8181
8282Any piece of IR that represents a kind of "term" (e.g., a type, part
8383of a type, or a goal, etc) in the logic should implement ` TypeFoldable ` . We
8484also implement ` TypeFoldable ` for common collection types like ` Vec ` as well
8585as tuples, references, etc.
8686
87- The ` SuperFold ` trait should only be implemented for those types that
87+ The ` TypeSuperFoldable ` trait should only be implemented for those types that
8888have a callback defined on the ` Folder ` trait (e.g., types and
8989lifetimes).
9090
9191## Derives
9292
9393Using the ` chalk-derive ` crate, you can auto-derive the ` TypeFoldable ` trait.
94- There isn't presently a derive for ` SuperFold ` since it is very rare
94+ There isn't presently a derive for ` TypeSuperFoldable ` since it is very rare
9595to require it. The derive for ` TypeFoldable ` is a bit cludgy and requires:
9696
9797* You must import ` TypeFoldable ` into scope.
0 commit comments