Merge pull request #2948 from Nemo157/patch-1
Add known problem for redundant_closure lint
This commit is contained in:
commit
3bd062e1d9
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…
Add table
Reference in a new issue