Add a lint to suggest uint == 0 over uint <= 0

This commit is contained in:
scurest
2016-01-29 00:39:13 -06:00
parent 5402ef3d27
commit e48fbba864
5 changed files with 71 additions and 2 deletions

View File

@@ -146,6 +146,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
reg.register_late_lint_pass(box types::CharLitAsU8);
reg.register_late_lint_pass(box print::PrintLint);
reg.register_late_lint_pass(box vec::UselessVec);
reg.register_late_lint_pass(box types::AbsurdUnsignedComparisons);
reg.register_lint_group("clippy_pedantic", vec![
@@ -247,6 +248,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
strings::STRING_LIT_AS_BYTES,
temporary_assignment::TEMPORARY_ASSIGNMENT,
transmute::USELESS_TRANSMUTE,
types::ABSURD_UNSIGNED_COMPARISONS,
types::BOX_VEC,
types::CHAR_LIT_AS_U8,
types::LET_UNIT_VALUE,