diff options
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/check.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/check.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 7732809a41d..5285d48ab3e 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -37,7 +37,8 @@ use {rustc_attr_data_structures as attrs, rustc_hir as hir}; use super::compare_impl_item::check_type_bounds; use super::*; use crate::check::wfcheck::{ - check_trait_item, check_variances_for_type_defn, check_where_clauses, enter_wf_checking_ctxt, + check_associated_item, check_trait_item, check_variances_for_type_defn, check_where_clauses, + enter_wf_checking_ctxt, }; fn add_abi_diag_help<T: EmissionGuarantee>(abi: ExternAbi, diag: &mut Diag<'_, T>) { @@ -981,6 +982,7 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), tcx.ensure_ok().type_of(def_id); tcx.ensure_ok().fn_sig(def_id); tcx.ensure_ok().predicates_of(def_id); + res = res.and(check_associated_item(tcx, def_id)); let assoc_item = tcx.associated_item(def_id); match assoc_item.container { ty::AssocItemContainer::Impl => {} @@ -992,6 +994,7 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), DefKind::AssocConst => { tcx.ensure_ok().type_of(def_id); tcx.ensure_ok().predicates_of(def_id); + res = res.and(check_associated_item(tcx, def_id)); let assoc_item = tcx.associated_item(def_id); match assoc_item.container { ty::AssocItemContainer::Impl => {} @@ -1002,6 +1005,7 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), } DefKind::AssocTy => { tcx.ensure_ok().predicates_of(def_id); + res = res.and(check_associated_item(tcx, def_id)); let assoc_item = tcx.associated_item(def_id); let has_type = match assoc_item.container { |
