@@ -85,6 +85,9 @@ macro_rules! declare_clippy_lint {
85
85
{ pub $name: tt, internal, $description: tt } => {
86
86
declare_lint! { pub $name, Allow , $description }
87
87
} ;
88
+ { pub $name: tt, internal_warn, $description: tt } => {
89
+ declare_lint! { pub $name, Warn , $description }
90
+ } ;
88
91
}
89
92
90
93
pub mod consts;
@@ -443,7 +446,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
443
446
misc:: USED_UNDERSCORE_BINDING ,
444
447
misc_early:: UNSEPARATED_LITERAL_SUFFIX ,
445
448
mut_mut:: MUT_MUT ,
446
- mutex_atomic:: MUTEX_INTEGER ,
447
449
needless_continue:: NEEDLESS_CONTINUE ,
448
450
non_expressive_names:: SIMILAR_NAMES ,
449
451
replace_consts:: REPLACE_CONSTS ,
@@ -674,10 +676,8 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
674
676
enum_variants:: MODULE_INCEPTION ,
675
677
eq_op:: OP_REF ,
676
678
eta_reduction:: REDUNDANT_CLOSURE ,
677
- formatting:: POSSIBLE_MISSING_COMMA ,
678
679
formatting:: SUSPICIOUS_ASSIGNMENT_FORMATTING ,
679
680
formatting:: SUSPICIOUS_ELSE_FORMATTING ,
680
- functions:: TOO_MANY_ARGUMENTS ,
681
681
if_let_redundant_pattern_matching:: IF_LET_REDUNDANT_PATTERN_MATCHING ,
682
682
len_zero:: LEN_WITHOUT_IS_EMPTY ,
683
683
len_zero:: LEN_ZERO ,
@@ -686,15 +686,10 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
686
686
literal_representation:: LARGE_DIGIT_GROUPS ,
687
687
literal_representation:: UNREADABLE_LITERAL ,
688
688
loops:: EMPTY_LOOP ,
689
- loops:: EXPLICIT_COUNTER_LOOP ,
690
689
loops:: EXPLICIT_INTO_ITER_LOOP ,
691
690
loops:: EXPLICIT_ITER_LOOP ,
692
691
loops:: FOR_KV_MAP ,
693
- loops:: MANUAL_MEMCPY ,
694
692
loops:: NEEDLESS_RANGE_LOOP ,
695
- loops:: NEVER_LOOP ,
696
- loops:: UNUSED_COLLECT ,
697
- loops:: WHILE_LET_LOOP ,
698
693
loops:: WHILE_LET_ON_ITERATOR ,
699
694
map_clone:: MAP_CLONE ,
700
695
matches:: MATCH_BOOL ,
@@ -703,16 +698,12 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
703
698
matches:: MATCH_WILD_ERR_ARM ,
704
699
matches:: SINGLE_MATCH ,
705
700
methods:: CHARS_LAST_CMP ,
706
- methods:: CHARS_NEXT_CMP ,
707
- methods:: FILTER_NEXT ,
708
701
methods:: GET_UNWRAP ,
709
702
methods:: ITER_CLONED_COLLECT ,
710
703
methods:: ITER_SKIP_NEXT ,
711
704
methods:: NEW_RET_NO_SELF ,
712
705
methods:: OK_EXPECT ,
713
706
methods:: OPTION_MAP_OR_NONE ,
714
- methods:: OR_FUN_CALL ,
715
- methods:: SEARCH_IS_SOME ,
716
707
methods:: SHOULD_IMPLEMENT_TRAIT ,
717
708
methods:: STRING_EXTEND_CHARS ,
718
709
methods:: UNNECESSARY_FOLD ,
@@ -724,10 +715,8 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
724
715
misc_early:: DOUBLE_NEG ,
725
716
misc_early:: DUPLICATE_UNDERSCORE_ARGUMENT ,
726
717
misc_early:: MIXED_CASE_HEX_LITERALS ,
727
- misc_early:: REDUNDANT_CLOSURE_CALL ,
728
718
misc_early:: UNNEEDED_FIELD_PATTERN ,
729
719
mut_reference:: UNNECESSARY_MUT_PASSED ,
730
- needless_bool:: BOOL_COMPARISON ,
731
720
needless_pass_by_value:: NEEDLESS_PASS_BY_VALUE ,
732
721
neg_multiply:: NEG_MULTIPLY ,
733
722
new_without_default:: NEW_WITHOUT_DEFAULT ,
@@ -763,22 +752,25 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
763
752
eval_order_dependence:: EVAL_ORDER_DEPENDENCE ,
764
753
explicit_write:: EXPLICIT_WRITE ,
765
754
format:: USELESS_FORMAT ,
755
+ functions:: TOO_MANY_ARGUMENTS ,
766
756
identity_conversion:: IDENTITY_CONVERSION ,
767
757
identity_op:: IDENTITY_OP ,
768
- inline_fn_without_body:: INLINE_FN_WITHOUT_BODY ,
769
758
int_plus_one:: INT_PLUS_ONE ,
770
759
lifetimes:: NEEDLESS_LIFETIMES ,
771
760
lifetimes:: UNUSED_LIFETIMES ,
772
- loops:: FOR_LOOP_OVER_OPTION ,
773
- loops:: FOR_LOOP_OVER_RESULT ,
774
- loops:: ITER_NEXT_LOOP ,
761
+ loops:: EXPLICIT_COUNTER_LOOP ,
775
762
loops:: MUT_RANGE_BOUND ,
763
+ loops:: WHILE_LET_LOOP ,
776
764
matches:: MATCH_AS_REF ,
765
+ methods:: CHARS_NEXT_CMP ,
777
766
methods:: CLONE_ON_COPY ,
767
+ methods:: FILTER_NEXT ,
768
+ methods:: SEARCH_IS_SOME ,
778
769
methods:: USELESS_ASREF ,
779
- misc:: FLOAT_CMP ,
780
770
misc:: SHORT_CIRCUIT_STATEMENT ,
771
+ misc_early:: REDUNDANT_CLOSURE_CALL ,
781
772
misc_early:: ZERO_PREFIXED_LITERAL ,
773
+ needless_bool:: BOOL_COMPARISON ,
782
774
needless_bool:: NEEDLESS_BOOL ,
783
775
needless_borrow:: NEEDLESS_BORROW ,
784
776
needless_borrowed_ref:: NEEDLESS_BORROWED_REFERENCE ,
@@ -801,7 +793,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
801
793
transmute:: TRANSMUTE_PTR_TO_REF ,
802
794
transmute:: USELESS_TRANSMUTE ,
803
795
types:: BORROWED_BOX ,
804
- types:: BOX_VEC ,
805
796
types:: CAST_LOSSLESS ,
806
797
types:: CHAR_LIT_AS_U8 ,
807
798
types:: OPTION_OPTION ,
@@ -830,15 +821,22 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
830
821
enum_clike:: ENUM_CLIKE_UNPORTABLE_VARIANT ,
831
822
eq_op:: EQ_OP ,
832
823
erasing_op:: ERASING_OP ,
824
+ formatting:: POSSIBLE_MISSING_COMMA ,
833
825
functions:: NOT_UNSAFE_PTR_ARG_DEREF ,
834
826
infinite_iter:: INFINITE_ITER ,
827
+ inline_fn_without_body:: INLINE_FN_WITHOUT_BODY ,
835
828
invalid_ref:: INVALID_REF ,
829
+ loops:: FOR_LOOP_OVER_OPTION ,
830
+ loops:: FOR_LOOP_OVER_RESULT ,
831
+ loops:: ITER_NEXT_LOOP ,
832
+ loops:: NEVER_LOOP ,
836
833
loops:: REVERSE_RANGE_LOOP ,
837
834
loops:: WHILE_IMMUTABLE_CONDITION ,
838
835
methods:: CLONE_DOUBLE_REF ,
839
836
methods:: TEMPORARY_CSTRING_AS_PTR ,
840
837
minmax:: MIN_MAX ,
841
838
misc:: CMP_NAN ,
839
+ misc:: FLOAT_CMP ,
842
840
misc:: MODULO_ONE ,
843
841
open_options:: NONSENSICAL_OPEN_OPTIONS ,
844
842
ptr:: MUT_FROM_REF ,
@@ -860,15 +858,20 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
860
858
entry:: MAP_ENTRY ,
861
859
escape:: BOXED_LOCAL ,
862
860
large_enum_variant:: LARGE_ENUM_VARIANT ,
861
+ loops:: MANUAL_MEMCPY ,
862
+ loops:: UNUSED_COLLECT ,
863
863
methods:: ITER_NTH ,
864
+ methods:: OR_FUN_CALL ,
864
865
methods:: SINGLE_CHAR_PATTERN ,
865
866
misc:: CMP_OWNED ,
866
867
mutex_atomic:: MUTEX_ATOMIC ,
868
+ types:: BOX_VEC ,
867
869
vec:: USELESS_VEC ,
868
870
] ) ;
869
871
870
872
reg. register_lint_group ( "clippy_nursery" , vec ! [
871
873
fallible_impl_from:: FALLIBLE_IMPL_FROM ,
874
+ mutex_atomic:: MUTEX_INTEGER ,
872
875
ranges:: RANGE_PLUS_ONE ,
873
876
] ) ;
874
877
}
0 commit comments