@@ -889,8 +889,6 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(),
889889 tcx. ensure_ok ( ) . predicates_of ( def_id) ;
890890 tcx. ensure_ok ( ) . explicit_item_bounds ( def_id) ;
891891 tcx. ensure_ok ( ) . explicit_item_self_bounds ( def_id) ;
892- tcx. ensure_ok ( ) . item_bounds ( def_id) ;
893- tcx. ensure_ok ( ) . item_self_bounds ( def_id) ;
894892 if tcx. is_conditionally_const ( def_id) {
895893 tcx. ensure_ok ( ) . explicit_implied_const_bounds ( def_id) ;
896894 tcx. ensure_ok ( ) . const_conditions ( def_id) ;
@@ -1042,8 +1040,12 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(),
10421040 let has_type = match assoc_item. container {
10431041 ty:: AssocItemContainer :: Impl => true ,
10441042 ty:: AssocItemContainer :: Trait => {
1045- tcx. ensure_ok ( ) . item_bounds ( def_id) ;
1046- tcx. ensure_ok ( ) . item_self_bounds ( def_id) ;
1043+ tcx. ensure_ok ( ) . explicit_item_bounds ( def_id) ;
1044+ tcx. ensure_ok ( ) . explicit_item_self_bounds ( def_id) ;
1045+ if tcx. is_conditionally_const ( def_id) {
1046+ tcx. ensure_ok ( ) . explicit_implied_const_bounds ( def_id) ;
1047+ tcx. ensure_ok ( ) . const_conditions ( def_id) ;
1048+ }
10471049 res = res. and ( check_trait_item ( tcx, def_id) ) ;
10481050 assoc_item. defaultness ( tcx) . has_value ( )
10491051 }
0 commit comments