@@ -279,7 +279,7 @@ fn predicates_reference_self(
279
279
trait_def_id : DefId ,
280
280
supertraits_only : bool ,
281
281
) -> SmallVec < [ Span ; 1 ] > {
282
- let trait_ref = ty:: TraitRef :: identity ( tcx, trait_def_id) ;
282
+ let trait_ref = ty:: Binder :: dummy ( ty :: TraitRef :: identity ( tcx, trait_def_id) ) ;
283
283
let predicates = if supertraits_only {
284
284
tcx. super_predicates_of ( trait_def_id)
285
285
} else {
@@ -661,9 +661,9 @@ fn object_ty_for_trait<'tcx>(
661
661
let trait_ref = ty:: TraitRef :: identity ( tcx, trait_def_id) ;
662
662
debug ! ( ?trait_ref) ;
663
663
664
- let trait_predicate = trait_ref . map_bound ( |trait_ref| {
665
- ty:: ExistentialPredicate :: Trait ( ty :: ExistentialTraitRef :: erase_self_ty ( tcx, trait_ref) )
666
- } ) ;
664
+ let trait_predicate = ty :: Binder :: dummy ( ty :: ExistentialPredicate :: Trait (
665
+ ty:: ExistentialTraitRef :: erase_self_ty ( tcx, trait_ref) ,
666
+ ) ) ;
667
667
debug ! ( ?trait_predicate) ;
668
668
669
669
let pred: ty:: Predicate < ' tcx > = trait_ref. to_predicate ( tcx) ;
@@ -880,7 +880,8 @@ fn contains_illegal_self_type_reference<'tcx, T: TypeVisitable<TyCtxt<'tcx>>>(
880
880
881
881
// Compute supertraits of current trait lazily.
882
882
if self . supertraits . is_none ( ) {
883
- let trait_ref = ty:: TraitRef :: identity ( self . tcx , self . trait_def_id ) ;
883
+ let trait_ref =
884
+ ty:: Binder :: dummy ( ty:: TraitRef :: identity ( self . tcx , self . trait_def_id ) ) ;
884
885
self . supertraits = Some (
885
886
traits:: supertraits ( self . tcx , trait_ref) . map ( |t| t. def_id ( ) ) . collect ( ) ,
886
887
) ;
0 commit comments