@@ -181,9 +181,12 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
181181 // on a trait we must also consider the bounds that follow the trait's name,
182182 // like `trait Foo: A + B + C`.
183183 if let Some ( self_bounds) = is_trait {
184- let bounds = icx. lowerer ( ) . lower_mono_bounds (
184+ let mut bounds = Bounds :: default ( ) ;
185+ icx. lowerer ( ) . lower_bounds (
185186 tcx. types . self_param ,
186187 self_bounds,
188+ & mut bounds,
189+ ty:: List :: empty ( ) ,
187190 PredicateFilter :: All ,
188191 ) ;
189192 predicates. extend ( bounds. clauses ( tcx) ) ;
@@ -265,9 +268,9 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
265268 }
266269
267270 let mut bounds = Bounds :: default ( ) ;
268- icx. lowerer ( ) . lower_poly_bounds (
271+ icx. lowerer ( ) . lower_bounds (
269272 ty,
270- bound_pred. bounds . iter ( ) ,
273+ bound_pred. bounds ,
271274 & mut bounds,
272275 bound_vars,
273276 PredicateFilter :: All ,
@@ -626,7 +629,7 @@ pub(super) fn implied_predicates_with_filter<'tcx>(
626629 bug ! ( "trait_def_id {trait_def_id:?} is not an item" ) ;
627630 } ;
628631
629- let ( generics, bounds ) = match item. kind {
632+ let ( generics, superbounds ) = match item. kind {
630633 hir:: ItemKind :: Trait ( .., generics, supertraits, _) => ( generics, supertraits) ,
631634 hir:: ItemKind :: TraitAlias ( generics, supertraits) => ( generics, supertraits) ,
632635 _ => span_bug ! ( item. span, "super_predicates invoked on non-trait" ) ,
@@ -635,7 +638,8 @@ pub(super) fn implied_predicates_with_filter<'tcx>(
635638 let icx = ItemCtxt :: new ( tcx, trait_def_id) ;
636639
637640 let self_param_ty = tcx. types . self_param ;
638- let superbounds = icx. lowerer ( ) . lower_mono_bounds ( self_param_ty, bounds, filter) ;
641+ let mut bounds = Bounds :: default ( ) ;
642+ icx. lowerer ( ) . lower_bounds ( self_param_ty, superbounds, & mut bounds, ty:: List :: empty ( ) , filter) ;
639643
640644 let where_bounds_that_match = icx. probe_ty_param_bounds_in_generics (
641645 generics,
@@ -646,7 +650,7 @@ pub(super) fn implied_predicates_with_filter<'tcx>(
646650
647651 // Combine the two lists to form the complete set of superbounds:
648652 let implied_bounds =
649- & * tcx. arena . alloc_from_iter ( superbounds . clauses ( tcx) . chain ( where_bounds_that_match) ) ;
653+ & * tcx. arena . alloc_from_iter ( bounds . clauses ( tcx) . chain ( where_bounds_that_match) ) ;
650654 debug ! ( ?implied_bounds) ;
651655
652656 // Now require that immediate supertraits are lowered, which will, in
@@ -834,9 +838,9 @@ impl<'tcx> ItemCtxt<'tcx> {
834838 } ;
835839
836840 let bound_vars = self . tcx . late_bound_vars ( predicate. hir_id ) ;
837- self . lowerer ( ) . lower_poly_bounds (
841+ self . lowerer ( ) . lower_bounds (
838842 bound_ty,
839- predicate. bounds . iter ( ) ,
843+ predicate. bounds ,
840844 & mut bounds,
841845 bound_vars,
842846 filter,
0 commit comments