]> git.lizzy.rs Git - rust.git/commitdiff
Register 'int_plus_one' lint case in clippy_lints
authorMichael Recachinas <mgr3yp@virginia.edu>
Sun, 17 Sep 2017 16:27:16 +0000 (17:27 +0100)
committerMichael Recachinas <mgr3yp@virginia.edu>
Sun, 17 Sep 2017 16:27:16 +0000 (17:27 +0100)
clippy_lints/src/lib.rs

index 520f9362c0fd479334d678e8556b65b615202026..e8b468e13f6d0ee374212e117c569210dc0b4123 100644 (file)
@@ -96,6 +96,7 @@ macro_rules! declare_restriction_lint {
 pub mod if_let_redundant_pattern_matching;
 pub mod if_not_else;
 pub mod infinite_iter;
+pub mod int_plus_one;
 pub mod is_unit_expr;
 pub mod items_after_statements;
 pub mod large_enum_variant;
@@ -299,6 +300,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
     reg.register_early_lint_pass(box formatting::Formatting);
     reg.register_late_lint_pass(box swap::Swap);
     reg.register_early_lint_pass(box if_not_else::IfNotElse);
+    reg.register_early_lint_pass(box int_plus_one::IntPlusOne);
     reg.register_late_lint_pass(box overflow_check_conditional::OverflowCheckConditional);
     reg.register_late_lint_pass(box unused_label::UnusedLabel);
     reg.register_late_lint_pass(box new_without_default::NewWithoutDefault);
@@ -341,6 +343,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
         enum_variants::PUB_ENUM_VARIANT_NAMES,
         enum_variants::STUTTER,
         if_not_else::IF_NOT_ELSE,
+        int_plus_one::INT_PLUS_ONE,
         infinite_iter::MAYBE_INFINITE_ITER,
         items_after_statements::ITEMS_AFTER_STATEMENTS,
         matches::SINGLE_MATCH_ELSE,