1
Fork 0

Auto merge of #118250 - petrochenkov:optdefkind, r=compiler-errors

rustc: Make `def_kind` mandatory for all `DefId`s

Prerequisite for https://github.com/rust-lang/rust/pull/118188.
This commit is contained in:
bors 2023-11-26 04:44:20 +00:00
commit 5c97719393
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`.