@@ -904,14 +904,23 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
904
904
& unwrap_in_result:: UNWRAP_IN_RESULT ,
905
905
& use_self:: USE_SELF ,
906
906
& useless_conversion:: USELESS_CONVERSION ,
907
+ #[ cfg( feature = "internal-lints" ) ]
907
908
& utils:: internal_lints:: CLIPPY_LINTS_INTERNAL ,
909
+ #[ cfg( feature = "internal-lints" ) ]
908
910
& utils:: internal_lints:: COLLAPSIBLE_SPAN_LINT_CALLS ,
911
+ #[ cfg( feature = "internal-lints" ) ]
909
912
& utils:: internal_lints:: COMPILER_LINT_FUNCTIONS ,
913
+ #[ cfg( feature = "internal-lints" ) ]
910
914
& utils:: internal_lints:: DEFAULT_LINT ,
915
+ #[ cfg( feature = "internal-lints" ) ]
911
916
& utils:: internal_lints:: INVALID_PATHS ,
917
+ #[ cfg( feature = "internal-lints" ) ]
912
918
& utils:: internal_lints:: LINT_WITHOUT_LINT_PASS ,
919
+ #[ cfg( feature = "internal-lints" ) ]
913
920
& utils:: internal_lints:: MATCH_TYPE_ON_DIAGNOSTIC_ITEM ,
921
+ #[ cfg( feature = "internal-lints" ) ]
914
922
& utils:: internal_lints:: OUTER_EXPN_EXPN_DATA ,
923
+ #[ cfg( feature = "internal-lints" ) ]
915
924
& utils:: internal_lints:: PRODUCE_ICE ,
916
925
& vec:: USELESS_VEC ,
917
926
& vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ,
@@ -932,11 +941,14 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
932
941
// end register lints, do not remove this comment, it’s used in `update_lints`
933
942
store. register_late_pass ( || box await_holding_invalid:: AwaitHolding ) ;
934
943
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 ) ;
944
+ #[ cfg( feature = "internal-lints" ) ]
945
+ {
946
+ store. register_late_pass ( || box utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ;
947
+ store. register_late_pass ( || box utils:: internal_lints:: LintWithoutLintPass :: default ( ) ) ;
948
+ store. register_late_pass ( || box utils:: internal_lints:: OuterExpnDataPass ) ;
949
+ store. register_late_pass ( || box utils:: internal_lints:: InvalidPaths ) ;
950
+ store. register_late_pass ( || box utils:: inspector:: DeepCodeInspector ) ;
951
+ }
940
952
store. register_late_pass ( || box utils:: author:: Author ) ;
941
953
let vec_box_size_threshold = conf. vec_box_size_threshold ;
942
954
store. register_late_pass ( move || box types:: Types :: new ( vec_box_size_threshold) ) ;
@@ -1122,6 +1134,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1122
1134
store. register_early_pass ( || box literal_representation:: LiteralDigitGrouping ) ;
1123
1135
let literal_representation_threshold = conf. literal_representation_threshold ;
1124
1136
store. register_early_pass ( move || box literal_representation:: DecimalLiteralRepresentation :: new ( literal_representation_threshold) ) ;
1137
+ #[ cfg( feature = "internal-lints" ) ]
1125
1138
store. register_early_pass ( || box utils:: internal_lints:: ClippyLintsInternal ) ;
1126
1139
let enum_variant_name_threshold = conf. enum_variant_name_threshold ;
1127
1140
store. register_early_pass ( move || box enum_variants:: EnumVariantNames :: new ( enum_variant_name_threshold) ) ;
@@ -1136,6 +1149,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1136
1149
store. register_late_pass ( move || box large_const_arrays:: LargeConstArrays :: new ( array_size_threshold) ) ;
1137
1150
store. register_late_pass ( || box floating_point_arithmetic:: FloatingPointArithmetic ) ;
1138
1151
store. register_early_pass ( || box as_conversions:: AsConversions ) ;
1152
+ #[ cfg( feature = "internal-lints" ) ]
1139
1153
store. register_early_pass ( || box utils:: internal_lints:: ProduceIce ) ;
1140
1154
store. register_late_pass ( || box let_underscore:: LetUnderscore ) ;
1141
1155
store. register_late_pass ( || box atomic_ordering:: AtomicOrdering ) ;
@@ -1152,6 +1166,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1152
1166
store. register_late_pass ( || box dereference:: Dereferencing ) ;
1153
1167
store. register_late_pass ( || box option_if_let_else:: OptionIfLetElse ) ;
1154
1168
store. register_late_pass ( || box future_not_send:: FutureNotSend ) ;
1169
+ #[ cfg( feature = "internal-lints" ) ]
1155
1170
store. register_late_pass ( || box utils:: internal_lints:: CollapsibleCalls ) ;
1156
1171
store. register_late_pass ( || box if_let_mutex:: IfLetMutex ) ;
1157
1172
store. register_late_pass ( || box mut_mutex_lock:: MutMutexLock ) ;
@@ -1177,6 +1192,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1177
1192
store. register_late_pass ( || box manual_ok_or:: ManualOkOr ) ;
1178
1193
store. register_late_pass ( || box float_equality_without_abs:: FloatEqualityWithoutAbs ) ;
1179
1194
store. register_late_pass ( || box async_yields_async:: AsyncYieldsAsync ) ;
1195
+ #[ cfg( feature = "internal-lints" ) ]
1180
1196
store. register_late_pass ( || box utils:: internal_lints:: MatchTypeOnDiagItem ) ;
1181
1197
let disallowed_methods = conf. disallowed_methods . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
1182
1198
store. register_late_pass ( move || box disallowed_method:: DisallowedMethod :: new ( & disallowed_methods) ) ;
@@ -1317,7 +1333,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1317
1333
LintId :: of( & wildcard_imports:: ENUM_GLOB_USE ) ,
1318
1334
LintId :: of( & wildcard_imports:: WILDCARD_IMPORTS ) ,
1319
1335
] ) ;
1320
-
1336
+ # [ cfg ( feature = "internal-lints" ) ]
1321
1337
store. register_group ( true , "clippy::internal" , Some ( "clippy_internal" ) , vec ! [
1322
1338
LintId :: of( & utils:: internal_lints:: CLIPPY_LINTS_INTERNAL ) ,
1323
1339
LintId :: of( & utils:: internal_lints:: COLLAPSIBLE_SPAN_LINT_CALLS ) ,
0 commit comments