@@ -632,9 +632,8 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
632
632
while !queue. is_empty ( ) {
633
633
let obligation = queue. remove ( 0 ) ;
634
634
debug ! ( "coerce_unsized resolve step: {:?}" , obligation) ;
635
- let bound_predicate = obligation. predicate . kind ( ) ;
636
- let trait_pred = match bound_predicate. skip_binder ( ) {
637
- ty:: PredicateKind :: Clause ( ty:: ClauseKind :: Trait ( trait_pred) )
635
+ let trait_pred = match obligation. predicate . kind ( ) . no_bound_vars ( ) {
636
+ Some ( ty:: PredicateKind :: Clause ( ty:: ClauseKind :: Trait ( trait_pred) ) )
638
637
if traits. contains ( & trait_pred. def_id ( ) ) =>
639
638
{
640
639
if unsize_did == trait_pred. def_id ( ) {
@@ -652,20 +651,20 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
652
651
has_unsized_tuple_coercion = true ;
653
652
}
654
653
}
655
- bound_predicate . rebind ( trait_pred)
654
+ trait_pred
656
655
}
657
656
_ => {
658
657
coercion. obligations . push ( obligation) ;
659
658
continue ;
660
659
}
661
660
} ;
662
- match selcx. poly_select ( & obligation. with ( selcx. tcx ( ) , trait_pred) ) {
661
+ match selcx. select ( & obligation. with ( selcx. tcx ( ) , trait_pred) ) {
663
662
// Uncertain or unimplemented.
664
663
Ok ( None ) => {
665
664
if trait_pred. def_id ( ) == unsize_did {
666
665
let trait_pred = self . resolve_vars_if_possible ( trait_pred) ;
667
- let self_ty = trait_pred. skip_binder ( ) . self_ty ( ) ;
668
- let unsize_ty = trait_pred. skip_binder ( ) . trait_ref . substs [ 1 ] . expect_ty ( ) ;
666
+ let self_ty = trait_pred. self_ty ( ) ;
667
+ let unsize_ty = trait_pred. trait_ref . substs [ 1 ] . expect_ty ( ) ;
669
668
debug ! ( "coerce_unsized: ambiguous unsize case for {:?}" , trait_pred) ;
670
669
match ( self_ty. kind ( ) , unsize_ty. kind ( ) ) {
671
670
( & ty:: Infer ( ty:: TyVar ( v) ) , ty:: Dynamic ( ..) )
0 commit comments