@@ -166,7 +166,13 @@ impl<'tcx> Visitor<'tcx> for NumericFallbackVisitor<'_, 'tcx> {
166166
167167 ExprKind :: MethodCall ( _, receiver, args, _) => {
168168 if let Some ( def_id) = self . cx . typeck_results ( ) . type_dependent_def_id ( expr. hir_id ) {
169- let fn_sig = self . cx . tcx . fn_sig ( def_id) . instantiate_identity ( ) . skip_binder ( ) ;
169+ let fn_sig = self
170+ . cx
171+ . tcx
172+ . fn_sig ( def_id)
173+ . instantiate_identity ( )
174+ . skip_norm_wip ( )
175+ . skip_binder ( ) ;
170176 for ( expr, bound) in iter:: zip ( iter:: once ( * receiver) . chain ( args. iter ( ) ) , fn_sig. inputs ( ) ) {
171177 self . ty_bounds . push ( ( * bound) . into ( ) ) ;
172178 self . visit_expr ( expr) ;
@@ -188,7 +194,7 @@ impl<'tcx> Visitor<'tcx> for NumericFallbackVisitor<'_, 'tcx> {
188194 for field in * fields {
189195 let bound = fields_def. iter ( ) . find_map ( |f_def| {
190196 if f_def. ident ( self . cx . tcx ) == field. ident {
191- Some ( self . cx . tcx . type_of ( f_def. did ) . instantiate_identity ( ) )
197+ Some ( self . cx . tcx . type_of ( f_def. did ) . instantiate_identity ( ) . skip_norm_wip ( ) )
192198 } else {
193199 None
194200 }
@@ -251,7 +257,7 @@ fn fn_sig_opt<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<PolyFnSig<'
251257 let node_ty = cx. typeck_results ( ) . node_type_opt ( hir_id) ?;
252258 // We can't use `Ty::fn_sig` because it automatically performs args, this may result in FNs.
253259 match node_ty. kind ( ) {
254- ty:: FnDef ( def_id, _) => Some ( cx. tcx . fn_sig ( * def_id) . instantiate_identity ( ) ) ,
260+ ty:: FnDef ( def_id, _) => Some ( cx. tcx . fn_sig ( * def_id) . instantiate_identity ( ) . skip_norm_wip ( ) ) ,
255261 ty:: FnPtr ( sig_tys, hdr) => Some ( sig_tys. with ( * hdr) ) ,
256262 _ => None ,
257263 }
0 commit comments