]> git.lizzy.rs Git - rust.git/commit
Auto merge of #93373 - spastorino:def_id_to_hir_id_refactor, r=oli-obk
authorbors <bors@rust-lang.org>
Mon, 31 Jan 2022 14:23:44 +0000 (14:23 +0000)
committerbors <bors@rust-lang.org>
Mon, 31 Jan 2022 14:23:44 +0000 (14:23 +0000)
commit24b8bb13bff98bb747cd403b86596af43aceee78
tree9cb2ad93d3cfa188d87785b2d1f3b914abb63dc3
parent86f5e177bca8121e1edc9864023a8ea61acf9034
parentbf1ca2e4b01b9930d29064b1d170a9ead0415fa2
Auto merge of #93373 - spastorino:def_id_to_hir_id_refactor, r=oli-obk

Store def_id_to_hir_id as variant in hir_owner.

If hir_owner is Owner(_), the LocalDefId is pointing to an owner, so the ItemLocalId is 0.
If the HIR node does not exist, we store Phantom.
Otherwise, we store the HirId associated to the LocalDefId.

Related to #89278

r? `@oli-obk`
compiler/rustc_middle/src/query/mod.rs
compiler/rustc_middle/src/ty/context.rs