@@ -1369,7 +1369,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
13691369 fn assemble_candidates_for_unsizing ( & mut self ,
13701370 obligation : & TraitObligation < ' tcx > ,
13711371 candidates : & mut SelectionCandidateSet < ' tcx > ) {
1372- // TODO is it Ok to skip the binder here?
1372+ // It is ok to skip past the higher-ranked binders here because the `match`
1373+ // below does not consider regions at all.
13731374 let source = self . infcx . shallow_resolve ( * obligation. self_ty ( ) . skip_binder ( ) ) ;
13741375 let target = self . infcx . shallow_resolve ( obligation. predicate . 0 . input_types ( ) [ 0 ] ) ;
13751376
@@ -1494,7 +1495,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
14941495 & ClosureCandidate ( ..) |
14951496 & FnPointerCandidate ( ..) |
14961497 & BuiltinObjectCandidate ( ..) |
1497- & & BuiltinUnsizeCandidate ( ..) |
1498+ & BuiltinUnsizeCandidate ( ..) |
14981499 & DefaultImplObjectCandidate ( ..) |
14991500 & BuiltinCandidate ( ..) => {
15001501 // We have a where-clause so don't go around looking
@@ -2498,7 +2499,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
24982499 ty:: lookup_field_type_unsubstituted ( tcx, def_id, f. id )
24992500 } ) . collect :: < Vec < _ > > ( ) ;
25002501
2501- // The last field of the structure has to exist and be a
2502+ // FIXME(#25351) The last field of the structure has to exist and be a
25022503 // type parameter (for now, to avoid tracking edge cases).
25032504 let i = if let Some ( & ty:: ty_param( p) ) = fields. last ( ) . map ( |ty| & ty. sty ) {
25042505 assert ! ( p. space == TypeSpace ) ;
0 commit comments