1
Fork 0

rustc: Make def_kind mandatory for all DefIds

This commit is contained in:
Vadim Petrochenkov 2023-11-24 00:49:02 +03:00
parent fad6bb80fa
commit 2c23386344
13 changed files with 36 additions and 56 deletions

View file

@ -259,7 +259,7 @@ fn associated_type_for_impl_trait_in_trait(
let local_def_id = trait_assoc_ty.def_id();
let def_id = local_def_id.to_def_id();
trait_assoc_ty.opt_def_kind(Some(DefKind::AssocTy));
trait_assoc_ty.def_kind(DefKind::AssocTy);
// There's no HIR associated with this new synthesized `def_id`, so feed
// `opt_local_def_id_to_hir_id` with `None`.
@ -362,7 +362,7 @@ fn associated_type_for_impl_trait_in_impl(
let local_def_id = impl_assoc_ty.def_id();
let def_id = local_def_id.to_def_id();
impl_assoc_ty.opt_def_kind(Some(DefKind::AssocTy));
impl_assoc_ty.def_kind(DefKind::AssocTy);
// There's no HIR associated with this new synthesized `def_id`, so feed
// `opt_local_def_id_to_hir_id` with `None`.