@@ -404,26 +404,9 @@ impl<'a,'tcx> ConfirmContext<'a,'tcx> {
404
404
all_substs. repr( self . tcx( ) ) ) ;
405
405
406
406
// Instantiate the bounds on the method with the
407
- // type/early-bound-regions substitutions performed. The only
408
- // late-bound-regions that can appear in bounds are from the
409
- // impl, and those were already instantiated above.
410
- //
411
- // FIXME(DST). Super hack. For a method on a trait object
412
- // `Trait`, the generic signature requires that
413
- // `Self:Trait`. Since, for an object, we bind `Self` to the
414
- // type `Trait`, this leads to an obligation
415
- // `Trait:Trait`. Until such time we DST is fully implemented,
416
- // that obligation is not necessarily satisfied. (In the
417
- // future, it would be.) But we know that the true `Self` DOES implement
418
- // the trait. So we just delete this requirement. Hack hack hack.
419
- let mut method_predicates = pick. method_ty . predicates . instantiate ( self . tcx ( ) , & all_substs) ;
420
- match pick. kind {
421
- probe:: ObjectPick ( ..) => {
422
- assert_eq ! ( method_predicates. predicates. get_slice( subst:: SelfSpace ) . len( ) , 1 ) ;
423
- method_predicates. predicates . pop ( subst:: SelfSpace ) ;
424
- }
425
- _ => { }
426
- }
407
+ // type/early-bound-regions substitutions performed. There can
408
+ // be no late-bound regions appearing here.
409
+ let method_predicates = pick. method_ty . predicates . instantiate ( self . tcx ( ) , & all_substs) ;
427
410
let method_predicates = self . fcx . normalize_associated_types_in ( self . span ,
428
411
& method_predicates) ;
429
412
0 commit comments