@@ -27,7 +27,7 @@ use rustc_middle::mir::{Rvalue, StatementKind};
2727use rustc_middle:: ty:: adjustment:: { Adjust , Adjustment , AutoBorrow , AutoBorrowMutability } ;
2828use rustc_middle:: ty:: {
2929 self , Binder , BoundVariableKind , Clause , EarlyBinder , FnSig , GenericArgKind , List , ParamEnv , ParamTy ,
30- PredicateKind , ProjectionPredicate , Ty , TyCtxt , TypeVisitable , TypeckResults ,
30+ PredicateKind , ProjectionPredicate , Ty , TyCtxt , TypeVisitableExt , TypeckResults ,
3131} ;
3232use rustc_session:: { declare_tool_lint, impl_lint_pass} ;
3333use rustc_span:: { symbol:: sym, Span , Symbol } ;
@@ -735,7 +735,7 @@ fn walk_parents<'tcx>(
735735 span,
736736 ..
737737 } ) if span. ctxt ( ) == ctxt => {
738- let ty = cx. tcx . type_of ( owner_id. def_id ) ;
738+ let ty = cx. tcx . type_of ( owner_id. def_id ) . subst_identity ( ) ;
739739 Some ( ty_auto_deref_stability ( cx. tcx , cx. param_env , ty, precedence) . position_for_result ( cx) )
740740 } ,
741741
@@ -781,7 +781,7 @@ fn walk_parents<'tcx>(
781781 cx. tcx ,
782782 // Use the param_env of the target type.
783783 cx. tcx . param_env ( adt. did ( ) ) ,
784- cx. tcx . type_of ( field_def. did ) ,
784+ cx. tcx . type_of ( field_def. did ) . subst_identity ( ) ,
785785 precedence,
786786 )
787787 . position_for_arg ( )
0 commit comments