@@ -901,14 +901,23 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
901
901
& unwrap_in_result:: UNWRAP_IN_RESULT ,
902
902
& use_self:: USE_SELF ,
903
903
& useless_conversion:: USELESS_CONVERSION ,
904
+ #[ cfg( feature = "internal-lints" ) ]
904
905
& utils:: internal_lints:: CLIPPY_LINTS_INTERNAL ,
906
+ #[ cfg( feature = "internal-lints" ) ]
905
907
& utils:: internal_lints:: COLLAPSIBLE_SPAN_LINT_CALLS ,
908
+ #[ cfg( feature = "internal-lints" ) ]
906
909
& utils:: internal_lints:: COMPILER_LINT_FUNCTIONS ,
910
+ #[ cfg( feature = "internal-lints" ) ]
907
911
& utils:: internal_lints:: DEFAULT_LINT ,
912
+ #[ cfg( feature = "internal-lints" ) ]
908
913
& utils:: internal_lints:: INVALID_PATHS ,
914
+ #[ cfg( feature = "internal-lints" ) ]
909
915
& utils:: internal_lints:: LINT_WITHOUT_LINT_PASS ,
916
+ #[ cfg( feature = "internal-lints" ) ]
910
917
& utils:: internal_lints:: MATCH_TYPE_ON_DIAGNOSTIC_ITEM ,
918
+ #[ cfg( feature = "internal-lints" ) ]
911
919
& utils:: internal_lints:: OUTER_EXPN_EXPN_DATA ,
920
+ #[ cfg( feature = "internal-lints" ) ]
912
921
& utils:: internal_lints:: PRODUCE_ICE ,
913
922
& vec:: USELESS_VEC ,
914
923
& vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ,
@@ -930,11 +939,14 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
930
939
931
940
store. register_late_pass ( || box await_holding_invalid:: AwaitHolding ) ;
932
941
store. register_late_pass ( || box serde_api:: SerdeAPI ) ;
933
- store. register_late_pass ( || box utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ;
934
- store. register_late_pass ( || box utils:: internal_lints:: LintWithoutLintPass :: default ( ) ) ;
935
- store. register_late_pass ( || box utils:: internal_lints:: OuterExpnDataPass ) ;
936
- store. register_late_pass ( || box utils:: internal_lints:: InvalidPaths ) ;
937
- store. register_late_pass ( || box utils:: inspector:: DeepCodeInspector ) ;
942
+ #[ cfg( feature = "internal-lints" ) ]
943
+ {
944
+ store. register_late_pass ( || box utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ;
945
+ store. register_late_pass ( || box utils:: internal_lints:: LintWithoutLintPass :: default ( ) ) ;
946
+ store. register_late_pass ( || box utils:: internal_lints:: OuterExpnDataPass ) ;
947
+ store. register_late_pass ( || box utils:: internal_lints:: InvalidPaths ) ;
948
+ store. register_late_pass ( || box utils:: inspector:: DeepCodeInspector ) ;
949
+ }
938
950
store. register_late_pass ( || box utils:: author:: Author ) ;
939
951
let vec_box_size_threshold = conf. vec_box_size_threshold ;
940
952
store. register_late_pass ( move || box types:: Types :: new ( vec_box_size_threshold) ) ;
@@ -1103,6 +1115,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1103
1115
store. register_early_pass ( || box literal_representation:: LiteralDigitGrouping ) ;
1104
1116
let literal_representation_threshold = conf. literal_representation_threshold ;
1105
1117
store. register_early_pass ( move || box literal_representation:: DecimalLiteralRepresentation :: new ( literal_representation_threshold) ) ;
1118
+ #[ cfg( feature = "internal-lints" ) ]
1106
1119
store. register_early_pass ( || box utils:: internal_lints:: ClippyLintsInternal ) ;
1107
1120
let enum_variant_name_threshold = conf. enum_variant_name_threshold ;
1108
1121
store. register_early_pass ( move || box enum_variants:: EnumVariantNames :: new ( enum_variant_name_threshold) ) ;
@@ -1117,6 +1130,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1117
1130
store. register_late_pass ( move || box large_const_arrays:: LargeConstArrays :: new ( array_size_threshold) ) ;
1118
1131
store. register_late_pass ( || box floating_point_arithmetic:: FloatingPointArithmetic ) ;
1119
1132
store. register_early_pass ( || box as_conversions:: AsConversions ) ;
1133
+ #[ cfg( feature = "internal-lints" ) ]
1120
1134
store. register_early_pass ( || box utils:: internal_lints:: ProduceIce ) ;
1121
1135
store. register_late_pass ( || box let_underscore:: LetUnderscore ) ;
1122
1136
store. register_late_pass ( || box atomic_ordering:: AtomicOrdering ) ;
@@ -1133,6 +1147,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1133
1147
store. register_late_pass ( || box dereference:: Dereferencing ) ;
1134
1148
store. register_late_pass ( || box option_if_let_else:: OptionIfLetElse ) ;
1135
1149
store. register_late_pass ( || box future_not_send:: FutureNotSend ) ;
1150
+ #[ cfg( feature = "internal-lints" ) ]
1136
1151
store. register_late_pass ( || box utils:: internal_lints:: CollapsibleCalls ) ;
1137
1152
store. register_late_pass ( || box if_let_mutex:: IfLetMutex ) ;
1138
1153
store. register_late_pass ( || box mut_mutex_lock:: MutMutexLock ) ;
@@ -1160,6 +1175,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1160
1175
store. register_late_pass ( || box float_equality_without_abs:: FloatEqualityWithoutAbs ) ;
1161
1176
store. register_late_pass ( || box async_yields_async:: AsyncYieldsAsync ) ;
1162
1177
store. register_late_pass ( || box manual_strip:: ManualStrip ) ;
1178
+ #[ cfg( feature = "internal-lints" ) ]
1163
1179
store. register_late_pass ( || box utils:: internal_lints:: MatchTypeOnDiagItem ) ;
1164
1180
let disallowed_methods = conf. disallowed_methods . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
1165
1181
store. register_late_pass ( move || box disallowed_method:: DisallowedMethod :: new ( & disallowed_methods) ) ;
@@ -1293,7 +1309,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1293
1309
LintId :: of( & wildcard_imports:: ENUM_GLOB_USE ) ,
1294
1310
LintId :: of( & wildcard_imports:: WILDCARD_IMPORTS ) ,
1295
1311
] ) ;
1296
-
1312
+ # [ cfg ( feature = "internal-lints" ) ]
1297
1313
store. register_group ( true , "clippy::internal" , Some ( "clippy_internal" ) , vec ! [
1298
1314
LintId :: of( & utils:: internal_lints:: CLIPPY_LINTS_INTERNAL ) ,
1299
1315
LintId :: of( & utils:: internal_lints:: COLLAPSIBLE_SPAN_LINT_CALLS ) ,
0 commit comments