File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,11 @@ impl DefPathTable {
101
101
pub struct Definitions {
102
102
table : DefPathTable ,
103
103
104
- // FIXME(eddyb) ideally all `LocalDefId`s would be HIR owners.
104
+ /// Only [`LocalDefId`]s for items and item-like are HIR owners.
105
+ /// The associated [`HirId`] has a `local_id` of `0`.
106
+ /// Generic parameters and closures are also assigned a `LocalDefId` but are not HIR owners.
107
+ /// Their `HirId`s are defined by their position while lowering the enclosing owner.
108
+ // FIXME(cjgillot) Some `LocalDefId`s from `use` items are dropped during lowering and lack a `HirId`.
105
109
pub ( super ) def_id_to_hir_id : IndexVec < LocalDefId , Option < hir:: HirId > > ,
106
110
/// The reverse mapping of `def_id_to_hir_id`.
107
111
pub ( super ) hir_id_to_def_id : FxHashMap < hir:: HirId , LocalDefId > ,
You can’t perform that action at this time.
0 commit comments