@@ -889,8 +889,6 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(),
889
889
tcx. ensure_ok ( ) . predicates_of ( def_id) ;
890
890
tcx. ensure_ok ( ) . explicit_item_bounds ( def_id) ;
891
891
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) ;
894
892
if tcx. is_conditionally_const ( def_id) {
895
893
tcx. ensure_ok ( ) . explicit_implied_const_bounds ( def_id) ;
896
894
tcx. ensure_ok ( ) . const_conditions ( def_id) ;
@@ -1042,8 +1040,12 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(),
1042
1040
let has_type = match assoc_item. container {
1043
1041
ty:: AssocItemContainer :: Impl => true ,
1044
1042
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
+ }
1047
1049
res = res. and ( check_trait_item ( tcx, def_id) ) ;
1048
1050
assoc_item. defaultness ( tcx) . has_value ( )
1049
1051
}
0 commit comments