|
1 | 1 | # Canonicalization |
2 | 2 |
|
3 | 3 | > **NOTE**: FIXME: The content of this chapter has some overlap with |
4 | | -> [Next-gen trait solving Canonicalization chapter](../solve/canonicalization.html). |
| 4 | +> [Next-gen trait solving Canonicalization chapter](../solve/canonicalization.html). |
5 | 5 | > It is suggested to reorganize these contents in the future. |
6 | 6 |
|
7 | 7 | Canonicalization is the process of **isolating** an inference value |
@@ -46,8 +46,8 @@ This query contains two unbound variables, but it also contains the |
46 | 46 | lifetime `'static`. The trait system generally ignores all lifetimes |
47 | 47 | and treats them equally, so when canonicalizing, we will *also* |
48 | 48 | replace any [free lifetime](../appendix/background.html#free-vs-bound) with a |
49 | | -canonical variable (Note that `'static` is actually a _free_ lifetime |
50 | | -variable here. We are not considering it in the typing context of the whole |
| 49 | +canonical variable (Note that `'static` is actually a _free_ lifetime |
| 50 | +variable here. We are not considering it in the typing context of the whole |
51 | 51 | program but only in the context of this trait reference. Mathematically, we |
52 | 52 | are not quantifying over the whole program, but only this obligation). |
53 | 53 | Therefore, we get the following result: |
@@ -106,7 +106,7 @@ Remember that substitution S though! We're going to need it later. |
106 | 106 |
|
107 | 107 | OK, now that we have a fresh inference context and an instantiated |
108 | 108 | query, we can go ahead and try to solve it. The trait solver itself is |
109 | | -explained in more detail in [another section](./slg.html), but |
| 109 | +explained in more detail in [another section](../solve/the-solver.md), but |
110 | 110 | suffice to say that it will compute a [certainty value][cqqr] (`Proven` or |
111 | 111 | `Ambiguous`) and have side-effects on the inference variables we've |
112 | 112 | created. For example, if there were only one impl of `Foo`, like so: |
|
0 commit comments