From 1f0d2562544a20b78865f4bf96386809e7ac055e Mon Sep 17 00:00:00 2001 From: "Adam C. Foltzer" Date: Mon, 5 Mar 2018 12:18:33 -0800 Subject: [PATCH] Fix typos --- src/incremental-compilation.md | 2 +- src/query.md | 2 +- src/trait-resolution.md | 4 ++-- src/type-inference.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/incremental-compilation.md b/src/incremental-compilation.md index dc4d06c6..6f5b48cc 100644 --- a/src/incremental-compilation.md +++ b/src/incremental-compilation.md @@ -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 diff --git a/src/query.md b/src/query.md index 481b4fed..33d2b3ba 100644 --- a/src/query.md +++ b/src/query.md @@ -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 diff --git a/src/trait-resolution.md b/src/trait-resolution.md index 1cad488a..28176d74 100644 --- a/src/trait-resolution.md +++ b/src/trait-resolution.md @@ -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. diff --git a/src/type-inference.md b/src/type-inference.md index c4307ce7..8812d34d 100644 --- a/src/type-inference.md +++ b/src/type-inference.md @@ -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.