]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #91299 - cjgillot:expect-ldid, r=petrochenkov
authorbors <bors@rust-lang.org>
Mon, 29 Nov 2021 15:02:01 +0000 (15:02 +0000)
committerbors <bors@rust-lang.org>
Mon, 29 Nov 2021 15:02:01 +0000 (15:02 +0000)
Take a LocalDefId in expect_*item.

Items and item-likes are always HIR owners.
When trying to find such nodes, there is no ambiguity, the `LocalDefId` and the `HirId::owner` always match.
In such cases, `local_def_id_to_hir_id` does not carry any meaningful information, so we can just skip calling it altogether.

1  2 
compiler/rustc_typeck/src/check/wfcheck.rs
compiler/rustc_typeck/src/collect.rs

Simple merge