Fix typos
This commit is contained in:
parent
c2560d523f
commit
1f0d256254
|
|
@ -114,7 +114,7 @@ This can lead to ICEs and other problems in the compiler.
|
|||
|
||||
## Improvements to the basic algorithm
|
||||
|
||||
In the description basic algorithm, we said that at the end of
|
||||
In the description of the basic algorithm, we said that at the end of
|
||||
compilation we would save the results of all the queries that were
|
||||
performed. In practice, this can be quite wasteful – many of those
|
||||
results are very cheap to recompute, and serializing and deserializing
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ They return the result of the query.
|
|||
#### How providers are setup
|
||||
|
||||
When the tcx is created, it is given the providers by its creator using
|
||||
the `Providers` struct. This struct is generate by the macros here, but it
|
||||
the `Providers` struct. This struct is generated by the macros here, but it
|
||||
is basically a big list of function pointers:
|
||||
|
||||
```rust
|
||||
|
|
|
|||
|
|
@ -263,13 +263,13 @@ Confirmation is where an error would be reported because the impl specified
|
|||
that `Target` would be `usize`, but the obligation reported `char`. Hence the
|
||||
result of selection would be an error.
|
||||
|
||||
Note that the candidate impl is chosen base on the `Self` type, but
|
||||
Note that the candidate impl is chosen based on the `Self` type, but
|
||||
confirmation is done based on (in this case) the `Target` type parameter.
|
||||
|
||||
### Selection during translation
|
||||
|
||||
As mentioned above, during type checking, we do not store the results of trait
|
||||
selection. At trans time, repeat the trait selection to choose a particular
|
||||
selection. At trans time, we repeat the trait selection to choose a particular
|
||||
impl for each method call. In this second selection, we do not consider any
|
||||
where-clauses to be in scope because we know that each resolution will resolve
|
||||
to a particular impl.
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ for some fresh `'cx` and `'tcx` – the latter corresponds to the lifetime of
|
|||
this temporary arena, and the `'cx` is the lifetime of the `InferCtxt` itself.
|
||||
(Again, see the [`ty` chapter][ty-ch] for more details on this setup.)
|
||||
|
||||
The `tcx.infer_ctxt` method actually returns a build, which means
|
||||
The `tcx.infer_ctxt` method actually returns a builder, which means
|
||||
there are some kinds of configuration you can do before the `infcx` is
|
||||
created. See `InferCtxtBuilder` for more information.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue