@@ -13,6 +13,7 @@ use rustc_middle::{
1313 ty:: { self , FloatTy , IntTy , PolyFnSig , Ty } ,
1414} ;
1515use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
16+ use std:: iter;
1617
1718declare_clippy_lint ! {
1819 /// **What it does:** Checks for usage of unconstrained numeric literals which may cause default numeric fallback in type
@@ -107,7 +108,7 @@ impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> {
107108 match & expr. kind {
108109 ExprKind :: Call ( func, args) => {
109110 if let Some ( fn_sig) = fn_sig_opt ( self . cx , func. hir_id ) {
110- for ( expr, bound) in args . iter ( ) . zip ( fn_sig. skip_binder ( ) . inputs ( ) . iter ( ) ) {
111+ for ( expr, bound) in iter:: zip ( * args , fn_sig. skip_binder ( ) . inputs ( ) ) {
111112 // Push found arg type, then visit arg.
112113 self . ty_bounds . push ( TyBound :: Ty ( bound) ) ;
113114 self . visit_expr ( expr) ;
@@ -120,7 +121,7 @@ impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> {
120121 ExprKind :: MethodCall ( _, _, args, _) => {
121122 if let Some ( def_id) = self . cx . typeck_results ( ) . type_dependent_def_id ( expr. hir_id ) {
122123 let fn_sig = self . cx . tcx . fn_sig ( def_id) . skip_binder ( ) ;
123- for ( expr, bound) in args . iter ( ) . zip ( fn_sig. inputs ( ) . iter ( ) ) {
124+ for ( expr, bound) in iter:: zip ( * args , fn_sig. inputs ( ) ) {
124125 self . ty_bounds . push ( TyBound :: Ty ( bound) ) ;
125126 self . visit_expr ( expr) ;
126127 self . ty_bounds . pop ( ) ;
0 commit comments