mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
Merge pull request #1103 from Manishearth/doc-eta
redundant closures don't allocate
This commit is contained in:
commit
fc2c6cbb08
@ -11,8 +11,8 @@ pub struct EtaPass;
|
||||
/// function can be called directly. `unsafe` functions or calls where types get adjusted are
|
||||
/// ignored.
|
||||
///
|
||||
/// **Why is this bad?** Needlessly creating a closure just costs heap space and adds code for no
|
||||
/// benefit.
|
||||
/// **Why is this bad?** Needlessly creating a closure adds code for no
|
||||
/// benefit and gives the optimizer more work.
|
||||
///
|
||||
/// **Known problems:** None
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user