Skip to content

Commit 3bd062e

Browse files
authored
Merge pull request #2948 from Nemo157/patch-1
Add known problem for redundant_closure lint
2 parents fde487c + 26eea10 commit 3bd062e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clippy_lints/src/eta_reduction.rs

Lines changed: 5 additions & 1 deletion
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)