File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ sorts of identifiers in active use:
88
88
expected, because it prevents [ ` DefId ` ] from upstream crates from
89
89
being passed instead and causing bugs at compile time.
90
90
- They can still be transformed back into ` DefId ` s as needed by using
91
- the [ ` LocalDefId::to_def_id ` ] method.
91
+ the [ ` LocalDefId::to_def_id ` ] [ to_def_id ] method.
92
92
- [ ` HirId ` ] , which combines the index of a particular item with an
93
93
offset within that item.
94
94
- the key point of a [ ` HirId ` ] is that it is * relative* to some item
@@ -102,6 +102,8 @@ sorts of identifiers in active use:
102
102
[ `HirId` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir_id/struct.HirId.html
103
103
[ `BodyId` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.BodyId.html
104
104
105
+ [ to_def_id ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.LocalDefId.html#method.to_def_id
106
+
105
107
We also have an internal map to go from ` DefId ` to what’s called "Def path". "Def path" is like a
106
108
module path but a bit more rich. For example, it may be ` crate::foo::MyStruct ` that identifies
107
109
this definition uniquely. It’s a bit different than a module path because it might include a type
You can’t perform that action at this time.
0 commit comments