@@ -29,15 +29,15 @@ tcx.infer_ctxt().enter(|infcx| {
29
29
30
30
Each inference context creates a short-lived type arena to store the
31
31
fresh types and things that it will create, as described in the
32
- [ README in the ` ty ` module] [ ty-readme ] . This arena is created by the ` enter `
32
+ [ chapter on the ` ty ` module] [ ty-ch ] . This arena is created by the ` enter `
33
33
function and disposed of after it returns.
34
34
35
- [ ty-readme ] : ty.html
35
+ [ ty-ch ] : ty.html
36
36
37
37
Within the closure, ` infcx ` has the type ` InferCtxt<'cx, 'gcx, 'tcx> `
38
38
for some fresh ` 'cx ` and ` 'tcx ` – the latter corresponds to the lifetime of
39
39
this temporary arena, and the ` 'cx ` is the lifetime of the ` InferCtxt ` itself.
40
- (Again, see the [ ` ty ` README ] [ ty-readme ] for more details on this setup.)
40
+ (Again, see the [ ` ty ` chapter ] [ ty-ch ] for more details on this setup.)
41
41
42
42
The ` tcx.infer_ctxt ` method actually returns a build, which means
43
43
there are some kinds of configuration you can do before the ` infcx ` is
@@ -104,9 +104,9 @@ side-effects of constraining type variables and so forth. However, the
104
104
actual return type is not ` () ` , but rather ` InferOk<()> ` . The
105
105
` InferOk ` type is used to carry extra trait obligations – your job is
106
106
to ensure that these are fulfilled (typically by enrolling them in a
107
- fulfillment context). See the [ trait README ] for more background on that.
107
+ fulfillment context). See the [ trait chapter ] for more background on that.
108
108
109
- [ trait README ] : trait-resolution.html
109
+ [ trait chapter ] : trait-resolution.html
110
110
111
111
You can similarly enforce subtyping through ` infcx.at(..).sub(..) ` . The same
112
112
basic concepts as above apply.
0 commit comments