File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,11 @@ impl DefPathTable {
101101pub struct Definitions {
102102 table : DefPathTable ,
103103
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`.
105109 pub ( super ) def_id_to_hir_id : IndexVec < LocalDefId , Option < hir:: HirId > > ,
106110 /// The reverse mapping of `def_id_to_hir_id`.
107111 pub ( super ) hir_id_to_def_id : FxHashMap < hir:: HirId , LocalDefId > ,
You can’t perform that action at this time.
0 commit comments