File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ sorts of identifiers in active use:
81
81
about the crate (such as its version number, as two versions of
82
82
the same crate can co-exist).
83
83
- A [ ` DefId ` ] really consists of two parts, a ` CrateNum ` (which
84
- identifies the crate) and a ` DefIndex ` (which indixes into a list
84
+ identifies the crate) and a ` DefIndex ` (which indexes into a list
85
85
of items that is maintained per crate).
86
86
- [ ` HirId ` ] , which combines the index of a particular item with an
87
87
offset within that item.
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ sanity checks in `src/librustc/hir/map/hir_id_validator.rs`:
25
25
any ` NodeId ` s in the ` HIR ` are checked for existing ` HirId ` s)
26
26
2 . Lowering a ` HirId ` must be done in the scope of the * owning* item.
27
27
This means you need to use ` with_hir_id_owner ` if you are creating parts
28
- of another item than the one being currently lowered. This happens for
28
+ of an item other than the one being currently lowered. This happens for
29
29
example during the lowering of existential ` impl Trait `
30
30
3 . A ` NodeId ` that will be placed into a HIR structure must be lowered,
31
31
even if its ` HirId ` is unused. Calling
@@ -45,4 +45,4 @@ generate a new `NodeId` in all those places because you'd also get a new
45
45
46
46
Having the ` NodeId ` also allows the ` DefCollector ` to generate the ` DefId ` s
47
47
instead of lowering having to do it on the fly. Centralizing the ` DefId `
48
- generation in one place makes it easier to refactor and reason about.
48
+ generation in one place makes it easier to refactor and reason about.
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ we did find. It consists of four parts:
143
143
144
144
Let's work through an example query to see what all the parts mean.
145
145
Consider [ the ` Borrow ` trait] [ borrow ] . This trait has a number of
146
- impls; among them, there are these two (for clarify , I've written the
146
+ impls; among them, there are these two (for clarity , I've written the
147
147
` Sized ` bounds explicitly):
148
148
149
149
[ borrow ] : https://doc.rust-lang.org/std/borrow/trait.Borrow.html
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ they are repeated.
29
29
30
30
We use this to improve caching as well as to detect cycles and other
31
31
things during trait resolution. Roughly speaking, the idea is that if
32
- two trait queries have the same canonicalize form, then they will get
32
+ two trait queries have the same canonical form, then they will get
33
33
the same answer. That answer will be expressed in terms of the
34
34
canonical variables (` ?0 ` , ` ?1 ` ), which we can then map back to the
35
35
original variables (` ?T ` , ` ?U ` ).
You can’t perform that action at this time.
0 commit comments