diff options
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/eta_reduction.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_lints/src/eta_reduction.rs b/src/tools/clippy/clippy_lints/src/eta_reduction.rs index ea4e5e052d0..f34cbee0355 100644 --- a/src/tools/clippy/clippy_lints/src/eta_reduction.rs +++ b/src/tools/clippy/clippy_lints/src/eta_reduction.rs @@ -124,7 +124,7 @@ impl<'tcx> LateLintPass<'tcx> for EtaReduction { span_lint_and_then(cx, REDUNDANT_CLOSURE, expr.span, "redundant closure", |diag| { if let Some(mut snippet) = snippet_opt(cx, callee.span) { if let Some(fn_mut_id) = cx.tcx.lang_items().fn_mut_trait() - && let args = cx.tcx.erase_late_bound_regions(ty::ClosureSubsts { substs }.sig()).inputs() + && let args = cx.tcx.erase_late_bound_regions(substs.as_closure().sig()).inputs() && implements_trait(cx, callee_ty.peel_refs(), fn_mut_id, &args.iter().copied().map(Into::into).collect::<Vec<_>>()) && path_to_local(callee).map_or(false, |l| local_used_after_expr(cx, l, expr)) { |
