]> git.lizzy.rs Git - rust.git/commitdiff
Add known problem for redundant_closure lint
authorWim <wim@nemo157.com>
Sat, 21 Jul 2018 16:05:02 +0000 (18:05 +0200)
committerGitHub <noreply@github.com>
Sat, 21 Jul 2018 16:05:02 +0000 (18:05 +0200)
Documenting https://github.com/rust-lang-nursery/rust-clippy/issues/1439 until it gets fixed.

clippy_lints/src/eta_reduction.rs

index 7b6623ed29b2b63984599ee59682fcc81f0f423b..b11bbfcdc2e7c8552173dcf13d4318d5ba2725ed 100644 (file)
 /// **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