Merge pull request #2948 from Nemo157/patch-1

Add known problem for redundant_closure lint
This commit is contained in:
Philipp Hansch 2018-07-25 22:55:36 +02:00 committed by GitHub
commit 3bd062e1d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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