redundant closures don't allocate

This commit is contained in:
Manish Goregaokar 2016-07-16 18:25:00 +05:30
parent 13a30aed2d
commit 3e13e24ed5
No known key found for this signature in database
GPG Key ID: 3BBF4D3E2EF79F98

View File

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