From fde7c94e0decda71edd3aaa0f7be4666159b825b Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sat, 10 May 2025 12:21:56 +0200 Subject: [PATCH] link to chapter referred to This made it look the the topic was covered in the chapter just before the current one. --- src/ty-fold.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ty-fold.md b/src/ty-fold.md index d4d0952f..ecb961cf 100644 --- a/src/ty-fold.md +++ b/src/ty-fold.md @@ -1,6 +1,6 @@ # `TypeFoldable` and `TypeFolder` -In the previous chapter we discussed instantiating binders. This must involves looking at everything inside of a `Early/Binder` +In [a previous chapter], we discussed instantiating binders. This must involves looking at everything inside of a `Early/Binder` 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 how do we implement the `instantiate` methods on the `Early/Binder` types. @@ -102,3 +102,4 @@ calls [ty_for_param](https://github.com/rust-lang/rust/blob/75ff3110ac6d8a0259023b83fd20d7ab295f8dd6/src/librustc_middle/ty/subst.rs#L552-L587) and all that does is index into the list of substitutions with the index of the `Param`. +[a previous chapter]: ty_module/instantiating_binders.md