X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=clippy_lints%2Fsrc%2Fneedless_pass_by_value.rs;h=986cd94cfb3cb794f819004ad84003f1effa099b;hb=6d1225981177587fbb68d9c4902c770c3dbaafb0;hp=f532f6fbec88abf6f27f983673d6fa05eb7f0876;hpb=374db5c0b7a8ebc92ecb35ee21e11961da6c754d;p=rust.git diff --git a/clippy_lints/src/needless_pass_by_value.rs b/clippy_lints/src/needless_pass_by_value.rs index f532f6fbec8..986cd94cfb3 100644 --- a/clippy_lints/src/needless_pass_by_value.rs +++ b/clippy_lints/src/needless_pass_by_value.rs @@ -72,7 +72,7 @@ fn check_fn( cx: &LateContext<'a, 'tcx>, kind: FnKind<'tcx>, decl: &'tcx FnDecl, - body: &'tcx Body, + body: &'tcx Body<'_>, span: Span, hir_id: HirId, ) { @@ -144,7 +144,7 @@ fn check_fn( let fn_sig = cx.tcx.fn_sig(fn_def_id); let fn_sig = cx.tcx.erase_late_bound_regions(&fn_sig); - for (idx, ((input, &ty), arg)) in decl.inputs.iter().zip(fn_sig.inputs()).zip(&body.params).enumerate() { + for (idx, ((input, &ty), arg)) in decl.inputs.iter().zip(fn_sig.inputs()).zip(body.params).enumerate() { // All spans generated from a proc-macro invocation are the same... if span == input.span { return;