@@ -498,6 +498,24 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
498498
499499 // begin register lints, do not remove this comment, it’s used in `update_lints`
500500 store. register_lints ( & [
501+ #[ cfg( feature = "internal-lints" ) ]
502+ & utils:: internal_lints:: CLIPPY_LINTS_INTERNAL ,
503+ #[ cfg( feature = "internal-lints" ) ]
504+ & utils:: internal_lints:: COLLAPSIBLE_SPAN_LINT_CALLS ,
505+ #[ cfg( feature = "internal-lints" ) ]
506+ & utils:: internal_lints:: COMPILER_LINT_FUNCTIONS ,
507+ #[ cfg( feature = "internal-lints" ) ]
508+ & utils:: internal_lints:: DEFAULT_LINT ,
509+ #[ cfg( feature = "internal-lints" ) ]
510+ & utils:: internal_lints:: INVALID_PATHS ,
511+ #[ cfg( feature = "internal-lints" ) ]
512+ & utils:: internal_lints:: LINT_WITHOUT_LINT_PASS ,
513+ #[ cfg( feature = "internal-lints" ) ]
514+ & utils:: internal_lints:: MATCH_TYPE_ON_DIAGNOSTIC_ITEM ,
515+ #[ cfg( feature = "internal-lints" ) ]
516+ & utils:: internal_lints:: OUTER_EXPN_EXPN_DATA ,
517+ #[ cfg( feature = "internal-lints" ) ]
518+ & utils:: internal_lints:: PRODUCE_ICE ,
501519 & approx_const:: APPROX_CONSTANT ,
502520 & arithmetic:: FLOAT_ARITHMETIC ,
503521 & arithmetic:: INTEGER_ARITHMETIC ,
@@ -904,15 +922,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
904922 & unwrap_in_result:: UNWRAP_IN_RESULT ,
905923 & use_self:: USE_SELF ,
906924 & useless_conversion:: USELESS_CONVERSION ,
907- & utils:: internal_lints:: CLIPPY_LINTS_INTERNAL ,
908- & utils:: internal_lints:: COLLAPSIBLE_SPAN_LINT_CALLS ,
909- & utils:: internal_lints:: COMPILER_LINT_FUNCTIONS ,
910- & utils:: internal_lints:: DEFAULT_LINT ,
911- & utils:: internal_lints:: INVALID_PATHS ,
912- & utils:: internal_lints:: LINT_WITHOUT_LINT_PASS ,
913- & utils:: internal_lints:: MATCH_TYPE_ON_DIAGNOSTIC_ITEM ,
914- & utils:: internal_lints:: OUTER_EXPN_EXPN_DATA ,
915- & utils:: internal_lints:: PRODUCE_ICE ,
916925 & vec:: USELESS_VEC ,
917926 & vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ,
918927 & verbose_file_reads:: VERBOSE_FILE_READS ,
@@ -930,14 +939,23 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
930939 & zero_div_zero:: ZERO_DIVIDED_BY_ZERO ,
931940 ] ) ;
932941 // end register lints, do not remove this comment, it’s used in `update_lints`
942+
943+ // all the internal lints
944+ #[ cfg( feature = "internal-lints" ) ]
945+ {
946+ store. register_early_pass ( || box utils:: internal_lints:: ClippyLintsInternal ) ;
947+ store. register_early_pass ( || box utils:: internal_lints:: ProduceIce ) ;
948+ store. register_late_pass ( || box utils:: inspector:: DeepCodeInspector ) ;
949+ store. register_late_pass ( || box utils:: internal_lints:: CollapsibleCalls ) ;
950+ store. register_late_pass ( || box utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ;
951+ store. register_late_pass ( || box utils:: internal_lints:: InvalidPaths ) ;
952+ store. register_late_pass ( || box utils:: internal_lints:: LintWithoutLintPass :: default ( ) ) ;
953+ store. register_late_pass ( || box utils:: internal_lints:: MatchTypeOnDiagItem ) ;
954+ store. register_late_pass ( || box utils:: internal_lints:: OuterExpnDataPass ) ;
955+ }
956+ store. register_late_pass ( || box utils:: author:: Author ) ;
933957 store. register_late_pass ( || box await_holding_invalid:: AwaitHolding ) ;
934958 store. register_late_pass ( || box serde_api:: SerdeAPI ) ;
935- store. register_late_pass ( || box utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ;
936- store. register_late_pass ( || box utils:: internal_lints:: LintWithoutLintPass :: default ( ) ) ;
937- store. register_late_pass ( || box utils:: internal_lints:: OuterExpnDataPass ) ;
938- store. register_late_pass ( || box utils:: internal_lints:: InvalidPaths ) ;
939- store. register_late_pass ( || box utils:: inspector:: DeepCodeInspector ) ;
940- store. register_late_pass ( || box utils:: author:: Author ) ;
941959 let vec_box_size_threshold = conf. vec_box_size_threshold ;
942960 store. register_late_pass ( move || box types:: Types :: new ( vec_box_size_threshold) ) ;
943961 store. register_late_pass ( || box booleans:: NonminimalBool ) ;
@@ -1122,7 +1140,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11221140 store. register_early_pass ( || box literal_representation:: LiteralDigitGrouping ) ;
11231141 let literal_representation_threshold = conf. literal_representation_threshold ;
11241142 store. register_early_pass ( move || box literal_representation:: DecimalLiteralRepresentation :: new ( literal_representation_threshold) ) ;
1125- store. register_early_pass ( || box utils:: internal_lints:: ClippyLintsInternal ) ;
11261143 let enum_variant_name_threshold = conf. enum_variant_name_threshold ;
11271144 store. register_early_pass ( move || box enum_variants:: EnumVariantNames :: new ( enum_variant_name_threshold) ) ;
11281145 store. register_early_pass ( || box tabs_in_doc_comments:: TabsInDocComments ) ;
@@ -1136,7 +1153,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11361153 store. register_late_pass ( move || box large_const_arrays:: LargeConstArrays :: new ( array_size_threshold) ) ;
11371154 store. register_late_pass ( || box floating_point_arithmetic:: FloatingPointArithmetic ) ;
11381155 store. register_early_pass ( || box as_conversions:: AsConversions ) ;
1139- store. register_early_pass ( || box utils:: internal_lints:: ProduceIce ) ;
11401156 store. register_late_pass ( || box let_underscore:: LetUnderscore ) ;
11411157 store. register_late_pass ( || box atomic_ordering:: AtomicOrdering ) ;
11421158 store. register_early_pass ( || box single_component_path_imports:: SingleComponentPathImports ) ;
@@ -1152,15 +1168,13 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11521168 store. register_late_pass ( || box dereference:: Dereferencing ) ;
11531169 store. register_late_pass ( || box option_if_let_else:: OptionIfLetElse ) ;
11541170 store. register_late_pass ( || box future_not_send:: FutureNotSend ) ;
1155- store. register_late_pass ( || box utils:: internal_lints:: CollapsibleCalls ) ;
11561171 store. register_late_pass ( || box if_let_mutex:: IfLetMutex ) ;
11571172 store. register_late_pass ( || box mut_mutex_lock:: MutMutexLock ) ;
11581173 store. register_late_pass ( || box match_on_vec_items:: MatchOnVecItems ) ;
11591174 store. register_late_pass ( || box manual_async_fn:: ManualAsyncFn ) ;
11601175 store. register_early_pass ( || box redundant_field_names:: RedundantFieldNames ) ;
11611176 store. register_late_pass ( || box vec_resize_to_zero:: VecResizeToZero ) ;
11621177 store. register_late_pass ( || box panic_in_result_fn:: PanicInResultFn ) ;
1163-
11641178 let single_char_binding_names_threshold = conf. single_char_binding_names_threshold ;
11651179 store. register_early_pass ( move || box non_expressive_names:: NonExpressiveNames {
11661180 single_char_binding_names_threshold,
@@ -1177,7 +1191,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11771191 store. register_late_pass ( || box manual_ok_or:: ManualOkOr ) ;
11781192 store. register_late_pass ( || box float_equality_without_abs:: FloatEqualityWithoutAbs ) ;
11791193 store. register_late_pass ( || box async_yields_async:: AsyncYieldsAsync ) ;
1180- store. register_late_pass ( || box utils:: internal_lints:: MatchTypeOnDiagItem ) ;
11811194 let disallowed_methods = conf. disallowed_methods . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
11821195 store. register_late_pass ( move || box disallowed_method:: DisallowedMethod :: new ( & disallowed_methods) ) ;
11831196 store. register_early_pass ( || box asm_syntax:: InlineAsmX86AttSyntax ) ;
@@ -1186,7 +1199,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11861199 store. register_late_pass ( || box strings:: StrToString ) ;
11871200 store. register_late_pass ( || box strings:: StringToString ) ;
11881201
1189-
11901202 store. register_group ( true , "clippy::restriction" , Some ( "clippy_restriction" ) , vec ! [
11911203 LintId :: of( & arithmetic:: FLOAT_ARITHMETIC ) ,
11921204 LintId :: of( & arithmetic:: INTEGER_ARITHMETIC ) ,
@@ -1318,6 +1330,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13181330 LintId :: of( & wildcard_imports:: WILDCARD_IMPORTS ) ,
13191331 ] ) ;
13201332
1333+ #[ cfg( feature = "internal-lints" ) ]
13211334 store. register_group ( true , "clippy::internal" , Some ( "clippy_internal" ) , vec ! [
13221335 LintId :: of( & utils:: internal_lints:: CLIPPY_LINTS_INTERNAL ) ,
13231336 LintId :: of( & utils:: internal_lints:: COLLAPSIBLE_SPAN_LINT_CALLS ) ,
0 commit comments