mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
Add known problem for redundant_closure lint
Documenting https://github.com/rust-lang-nursery/rust-clippy/issues/1439 until it gets fixed.
This commit is contained in:
parent
1f65617372
commit
26eea10ec1
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue