From 26eea10ec170a1cb1ab1db38dbc87d8abc88ac58 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 21 Jul 2018 18:05:02 +0200 Subject: [PATCH] Add known problem for redundant_closure lint Documenting https://github.com/rust-lang-nursery/rust-clippy/issues/1439 until it gets fixed. --- clippy_lints/src/eta_reduction.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/eta_reduction.rs b/clippy_lints/src/eta_reduction.rs index 7b6623ed29b2..b11bbfcdc2e7 100644 --- a/clippy_lints/src/eta_reduction.rs +++ b/clippy_lints/src/eta_reduction.rs @@ -15,7 +15,11 @@ pub struct EtaPass; /// **Why is this bad?** Needlessly creating a closure adds code for no benefit /// and gives the optimizer more work. /// -/// **Known problems:** None. +/// **Known problems:** If creating the closure inside the closure has a side- +/// effect then moving the closure creation out will change when that side- +/// effect runs. +/// See https://github.com/rust-lang-nursery/rust-clippy/issues/1439 for more +/// details. /// /// **Example:** /// ```rust