Skip to content

Commit 26eea10

Browse files
authored
Add known problem for redundant_closure lint
Documenting rust-lang#1439 until it gets fixed.
1 parent 1f65617 commit 26eea10

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clippy_lints/src/eta_reduction.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ pub struct EtaPass;
1515
/// **Why is this bad?** Needlessly creating a closure adds code for no benefit
1616
/// and gives the optimizer more work.
1717
///
18-
/// **Known problems:** None.
18+
/// **Known problems:** If creating the closure inside the closure has a side-
19+
/// effect then moving the closure creation out will change when that side-
20+
/// effect runs.
21+
/// See https://github.com/rust-lang-nursery/rust-clippy/issues/1439 for more
22+
/// details.
1923
///
2024
/// **Example:**
2125
/// ```rust

0 commit comments

Comments
 (0)