|
11 | 11 | //! modification. These are the ones containing the most important type-related
|
12 | 12 | //! information, such as `Ty`, `Predicate`, `Region`, and `Const`.
|
13 | 13 | //!
|
14 |
| -//! There are three groups of traits involved in each traversal. |
| 14 | +//! There are three traits involved in each traversal. |
15 | 15 | //! - `TypeFoldable`. This is implemented once for many types, including:
|
16 | 16 | //! - Types of interest, for which the methods delegate to the folder.
|
17 | 17 | //! - All other types, including generic containers like `Vec` and `Option`.
|
@@ -58,7 +58,7 @@ pub trait TypeFoldable<I: Interner>: TypeVisitable<I> {
|
58 | 58 | /// For most types, this just traverses the value, calling `try_fold_with`
|
59 | 59 | /// on each field/element.
|
60 | 60 | ///
|
61 |
| - /// For types of interest (such as `Ty`), the implementation of method |
| 61 | + /// For types of interest (such as `Ty`), the implementation of this method |
62 | 62 | /// calls a folder method specifically for that type (such as
|
63 | 63 | /// `F::try_fold_ty`). This is where control transfers from `TypeFoldable`
|
64 | 64 | /// to `TypeFolder`.
|
@@ -121,7 +121,7 @@ pub trait TypeFolder<I: Interner>: FallibleTypeFolder<I, Error = !> {
|
121 | 121 | }
|
122 | 122 |
|
123 | 123 | // The default region folder is a no-op because `Region` is non-recursive
|
124 |
| - // and has no `super_visit_with` method to call. That also explains the |
| 124 | + // and has no `super_fold_with` method to call. That also explains the |
125 | 125 | // lack of `I::Region: TypeSuperFoldable<I>` bound on this method.
|
126 | 126 | fn fold_region(&mut self, r: I::Region) -> I::Region {
|
127 | 127 | r
|
@@ -170,7 +170,7 @@ pub trait FallibleTypeFolder<I: Interner>: Sized {
|
170 | 170 | }
|
171 | 171 |
|
172 | 172 | // The default region folder is a no-op because `Region` is non-recursive
|
173 |
| - // and has no `super_visit_with` method to call. That also explains the |
| 173 | + // and has no `super_fold_with` method to call. That also explains the |
174 | 174 | // lack of `I::Region: TypeSuperFoldable<I>` bound on this method.
|
175 | 175 | fn try_fold_region(&mut self, r: I::Region) -> Result<I::Region, Self::Error> {
|
176 | 176 | Ok(r)
|
|
0 commit comments