Add eta reduction (fixes #29)

This commit is contained in:
Manish Goregaokar
2015-05-10 10:39:04 +05:30
parent 709dfe1cea
commit 2447e1d5be
6 changed files with 88 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ pub mod bit_mask;
pub mod ptr_arg;
pub mod needless_bool;
pub mod approx_const;
pub mod eta_reduction;
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
@@ -36,6 +37,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
reg.register_lint_pass(box approx_const::ApproxConstant as LintPassObject);
reg.register_lint_pass(box misc::FloatCmp as LintPassObject);
reg.register_lint_pass(box misc::Precedence as LintPassObject);
reg.register_lint_pass(box eta_reduction::EtaPass as LintPassObject);
reg.register_lint_group("clippy", vec![types::BOX_VEC, types::LINKEDLIST,
misc::SINGLE_MATCH, misc::STR_TO_STRING,
@@ -45,5 +47,6 @@ pub fn plugin_registrar(reg: &mut Registry) {
approx_const::APPROX_CONSTANT,
misc::CMP_NAN, misc::FLOAT_CMP,
misc::PRECEDENCE,
eta_reduction::REDUNDANT_CLOSURE,
]);
}