File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,17 @@ Binders can wrap an arbitrary Rust type `T`, not just a `Ty`.
7
7
So, how do we implement the ` instantiate ` methods on the ` Early/Binder ` types?
8
8
9
9
The answer is a couple of traits:
10
- [ ` TypeFoldable ` ] ( https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/fold/ trait.TypeFoldable.html )
10
+ [ ` TypeFoldable ` ] ( https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/trait.TypeFoldable.html )
11
11
and
12
- [ ` TypeFolder ` ] ( https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/fold/ trait.TypeFolder.html ) .
12
+ [ ` TypeFolder ` ] ( https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/trait.TypeFolder.html ) .
13
13
14
14
- ` TypeFoldable ` is implemented by types that embed type information. It allows you to recursively
15
15
process the contents of the ` TypeFoldable ` and do stuff to them.
16
16
- ` TypeFolder ` defines what you want to do with the types you encounter while processing the
17
17
` TypeFoldable ` .
18
18
19
19
For example, the ` TypeFolder ` trait has a method
20
- [ ` fold_ty ` ] ( https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/fold/ trait.TypeFolder.html#method.fold_ty )
20
+ [ ` fold_ty ` ] ( https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/trait.TypeFolder.html#method.fold_ty )
21
21
that takes a type as input and returns a new type as a result. ` TypeFoldable ` invokes the
22
22
` TypeFolder ` ` fold_foo ` methods on itself, giving the ` TypeFolder ` access to its contents (the
23
23
types, regions, etc that are contained within).
You can’t perform that action at this time.
0 commit comments