]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #81611 - cjgillot:meowner, r=estebank
authorbors <bors@rust-lang.org>
Tue, 16 Feb 2021 22:14:32 +0000 (22:14 +0000)
committerbors <bors@rust-lang.org>
Tue, 16 Feb 2021 22:14:32 +0000 (22:14 +0000)
commit8fe989dd768f5dfdb0fc90933f3f74fa4579fefd
treeb343f190d8e1bca405fba9548778befb1986087a
parenta143517d44cac50b20cbd3a0b579addab40dd399
parent91d8e59ccaacf7df2af847037d30871ed0bd90b6
Auto merge of #81611 - cjgillot:meowner, r=estebank

Only store a LocalDefId in some HIR nodes

Some HIR nodes are guaranteed to be HIR owners: Item, TraitItem, ImplItem, ForeignItem and MacroDef.
As a consequence, we do not need to store the `HirId`'s `local_id`, and we can directly store a `LocalDefId`.

This allows to avoid a bit of the dance with `tcx.hir().local_def_id` and `tcx.hir().local_def_id_to_hir_id` mappings.
compiler/rustc_ast_lowering/src/item.rs
compiler/rustc_hir_pretty/src/lib.rs
compiler/rustc_metadata/src/rmeta/encoder.rs
compiler/rustc_middle/src/hir/map/mod.rs
compiler/rustc_middle/src/ty/error.rs
compiler/rustc_typeck/src/astconv/mod.rs
compiler/rustc_typeck/src/check/method/suggest.rs
compiler/rustc_typeck/src/collect.rs
src/librustdoc/clean/mod.rs