@@ -27,7 +27,7 @@ use rustc_middle::mir::{Rvalue, StatementKind};
27
27
use rustc_middle:: ty:: adjustment:: { Adjust , Adjustment , AutoBorrow , AutoBorrowMutability } ;
28
28
use rustc_middle:: ty:: {
29
29
self , Binder , BoundVariableKind , Clause , EarlyBinder , FnSig , GenericArgKind , List , ParamEnv , ParamTy ,
30
- PredicateKind , ProjectionPredicate , Ty , TyCtxt , TypeVisitable , TypeckResults ,
30
+ PredicateKind , ProjectionPredicate , Ty , TyCtxt , TypeVisitableExt , TypeckResults ,
31
31
} ;
32
32
use rustc_session:: { declare_tool_lint, impl_lint_pass} ;
33
33
use rustc_span:: { symbol:: sym, Span , Symbol } ;
@@ -735,7 +735,7 @@ fn walk_parents<'tcx>(
735
735
span,
736
736
..
737
737
} ) 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 ( ) ;
739
739
Some ( ty_auto_deref_stability ( cx. tcx , cx. param_env , ty, precedence) . position_for_result ( cx) )
740
740
} ,
741
741
@@ -781,7 +781,7 @@ fn walk_parents<'tcx>(
781
781
cx. tcx ,
782
782
// Use the param_env of the target type.
783
783
cx. tcx . param_env ( adt. did ( ) ) ,
784
- cx. tcx . type_of ( field_def. did ) ,
784
+ cx. tcx . type_of ( field_def. did ) . subst_identity ( ) ,
785
785
precedence,
786
786
)
787
787
. position_for_arg ( )
0 commit comments