File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/doc/rustc-dev-guide/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11# ` TypeFoldable ` and ` TypeFolder `
22
3- In [ a previous chapter] , we discussed instantiating binders. This must involves looking at everything inside of a ` Early/Binder `
4- to find any usages of the bound vars in order to replace them. Binders can wrap an arbitrary rust type ` T ` not just a ` Ty ` so
3+ In [ a previous chapter] , we discussed instantiating binders. This involves looking at everything inside of a ` Early/Binder `
4+ to find any usages of the bound vars in order to replace them. Binders can wrap an arbitrary Rust type ` T ` not just a ` Ty ` so
55how do we implement the ` instantiate ` methods on the ` Early/Binder ` types.
66
77The answer is a couple of traits:
@@ -20,7 +20,7 @@ that takes a type as input and returns a new type as a result. `TypeFoldable` in
2020` TypeFolder ` ` fold_foo ` methods on itself, giving the ` TypeFolder ` access to its contents (the
2121types, regions, etc that are contained within).
2222
23- You can think of it with this analogy to the iterator combinators we have come to love in rust :
23+ You can think of it with this analogy to the iterator combinators we have come to love in Rust :
2424
2525``` rust,ignore
2626vec.iter().map(|e1| foo(e2)).collect()
You can’t perform that action at this time.
0 commit comments