@@ -48,7 +48,7 @@ trait ChildrenExt<'tcx> {
48
48
impl < ' tcx > ChildrenExt < ' tcx > for Children {
49
49
/// Insert an impl into this set of children without comparing to any existing impls.
50
50
fn insert_blindly ( & mut self , tcx : TyCtxt < ' tcx > , impl_def_id : DefId ) {
51
- let trait_ref = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) . subst_identity ( ) ;
51
+ let trait_ref = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) . skip_binder ( ) ;
52
52
if let Some ( st) = fast_reject:: simplify_type ( tcx, trait_ref. self_ty ( ) , TreatParams :: AsInfer )
53
53
{
54
54
debug ! ( "insert_blindly: impl_def_id={:?} st={:?}" , impl_def_id, st) ;
@@ -63,7 +63,7 @@ impl<'tcx> ChildrenExt<'tcx> for Children {
63
63
/// an impl with a parent. The impl must be present in the list of
64
64
/// children already.
65
65
fn remove_existing ( & mut self , tcx : TyCtxt < ' tcx > , impl_def_id : DefId ) {
66
- let trait_ref = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) . subst_identity ( ) ;
66
+ let trait_ref = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) . skip_binder ( ) ;
67
67
let vec: & mut Vec < DefId > ;
68
68
if let Some ( st) = fast_reject:: simplify_type ( tcx, trait_ref. self_ty ( ) , TreatParams :: AsInfer )
69
69
{
@@ -275,7 +275,8 @@ impl<'tcx> GraphExt<'tcx> for Graph {
275
275
) -> Result < Option < FutureCompatOverlapError < ' tcx > > , OverlapError < ' tcx > > {
276
276
assert ! ( impl_def_id. is_local( ) ) ;
277
277
278
- let trait_ref = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) . subst_identity ( ) ;
278
+ // FIXME: use `EarlyBinder` in `self.children`
279
+ let trait_ref = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) . skip_binder ( ) ;
279
280
let trait_def_id = trait_ref. def_id ;
280
281
281
282
debug ! (
@@ -388,7 +389,7 @@ pub(crate) fn assoc_def(
388
389
impl_def_id : DefId ,
389
390
assoc_def_id : DefId ,
390
391
) -> Result < LeafDef , ErrorGuaranteed > {
391
- let trait_def_id = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) . skip_binder ( ) . def_id ;
392
+ let trait_def_id = tcx. trait_id_of_impl ( impl_def_id) . unwrap ( ) ;
392
393
let trait_def = tcx. trait_def ( trait_def_id) ;
393
394
394
395
// This function may be called while we are still building the
0 commit comments