1
Fork 0

Take a LocalDefId in expect_*item.

This commit is contained in:
Camille GILLOT 2021-10-20 22:38:10 +02:00
parent e6d2de9483
commit 5fb4648757
28 changed files with 95 additions and 137 deletions

View file

@ -467,7 +467,7 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> {
parent_def_id == tcx.hir().local_def_id(opaque_parent_hir_id)
};
let (in_definition_scope, origin) =
match tcx.hir().expect_item(opaque_hir_id).kind {
match tcx.hir().expect_item(def_id).kind {
// Anonymous `impl Trait`
hir::ItemKind::OpaqueTy(hir::OpaqueTy {
impl_trait_fn: Some(parent),