@@ -901,15 +901,34 @@ 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" ) ]
907
+
905
908
& utils:: internal_lints:: COLLAPSIBLE_SPAN_LINT_CALLS ,
909
+ #[ cfg( feature = "internal-lints" ) ]
910
+
906
911
& utils:: internal_lints:: COMPILER_LINT_FUNCTIONS ,
912
+ #[ cfg( feature = "internal-lints" ) ]
913
+
907
914
& utils:: internal_lints:: DEFAULT_LINT ,
915
+ #[ cfg( feature = "internal-lints" ) ]
916
+
908
917
& utils:: internal_lints:: INVALID_PATHS ,
918
+ #[ cfg( feature = "internal-lints" ) ]
919
+
909
920
& utils:: internal_lints:: LINT_WITHOUT_LINT_PASS ,
921
+ #[ cfg( feature = "internal-lints" ) ]
922
+
910
923
& utils:: internal_lints:: MATCH_TYPE_ON_DIAGNOSTIC_ITEM ,
924
+ #[ cfg( feature = "internal-lints" ) ]
925
+
911
926
& utils:: internal_lints:: OUTER_EXPN_EXPN_DATA ,
927
+ #[ cfg( feature = "internal-lints" ) ]
928
+
912
929
& utils:: internal_lints:: PRODUCE_ICE ,
930
+ #[ cfg( feature = "internal-lints" ) ]
931
+
913
932
& vec:: USELESS_VEC ,
914
933
& vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ,
915
934
& verbose_file_reads:: VERBOSE_FILE_READS ,
@@ -930,11 +949,14 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
930
949
931
950
store. register_late_pass ( || box await_holding_invalid:: AwaitHolding ) ;
932
951
store. register_late_pass ( || box serde_api:: SerdeAPI ) ;
952
+ #[ cfg( feature = "internal-lints" ) ]
953
+ {
933
954
store. register_late_pass ( || box utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ;
934
955
store. register_late_pass ( || box utils:: internal_lints:: LintWithoutLintPass :: default ( ) ) ;
935
956
store. register_late_pass ( || box utils:: internal_lints:: OuterExpnDataPass ) ;
936
957
store. register_late_pass ( || box utils:: internal_lints:: InvalidPaths ) ;
937
958
store. register_late_pass ( || box utils:: inspector:: DeepCodeInspector ) ;
959
+ }
938
960
store. register_late_pass ( || box utils:: author:: Author ) ;
939
961
let vec_box_size_threshold = conf. vec_box_size_threshold ;
940
962
store. register_late_pass ( move || box types:: Types :: new ( vec_box_size_threshold) ) ;
@@ -1103,6 +1125,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1103
1125
store. register_early_pass ( || box literal_representation:: LiteralDigitGrouping ) ;
1104
1126
let literal_representation_threshold = conf. literal_representation_threshold ;
1105
1127
store. register_early_pass ( move || box literal_representation:: DecimalLiteralRepresentation :: new ( literal_representation_threshold) ) ;
1128
+ #[ cfg( feature = "internal-lints" ) ]
1129
+
1106
1130
store. register_early_pass ( || box utils:: internal_lints:: ClippyLintsInternal ) ;
1107
1131
let enum_variant_name_threshold = conf. enum_variant_name_threshold ;
1108
1132
store. register_early_pass ( move || box enum_variants:: EnumVariantNames :: new ( enum_variant_name_threshold) ) ;
@@ -1117,6 +1141,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1117
1141
store. register_late_pass ( move || box large_const_arrays:: LargeConstArrays :: new ( array_size_threshold) ) ;
1118
1142
store. register_late_pass ( || box floating_point_arithmetic:: FloatingPointArithmetic ) ;
1119
1143
store. register_early_pass ( || box as_conversions:: AsConversions ) ;
1144
+ #[ cfg( feature = "internal-lints" ) ]
1145
+
1120
1146
store. register_early_pass ( || box utils:: internal_lints:: ProduceIce ) ;
1121
1147
store. register_late_pass ( || box let_underscore:: LetUnderscore ) ;
1122
1148
store. register_late_pass ( || box atomic_ordering:: AtomicOrdering ) ;
@@ -1133,6 +1159,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1133
1159
store. register_late_pass ( || box dereference:: Dereferencing ) ;
1134
1160
store. register_late_pass ( || box option_if_let_else:: OptionIfLetElse ) ;
1135
1161
store. register_late_pass ( || box future_not_send:: FutureNotSend ) ;
1162
+ #[ cfg( feature = "internal-lints" ) ]
1163
+
1136
1164
store. register_late_pass ( || box utils:: internal_lints:: CollapsibleCalls ) ;
1137
1165
store. register_late_pass ( || box if_let_mutex:: IfLetMutex ) ;
1138
1166
store. register_late_pass ( || box mut_mutex_lock:: MutMutexLock ) ;
@@ -1160,6 +1188,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1160
1188
store. register_late_pass ( || box float_equality_without_abs:: FloatEqualityWithoutAbs ) ;
1161
1189
store. register_late_pass ( || box async_yields_async:: AsyncYieldsAsync ) ;
1162
1190
store. register_late_pass ( || box manual_strip:: ManualStrip ) ;
1191
+ #[ cfg( feature = "internal-lints" ) ]
1192
+
1163
1193
store. register_late_pass ( || box utils:: internal_lints:: MatchTypeOnDiagItem ) ;
1164
1194
let disallowed_methods = conf. disallowed_methods . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
1165
1195
store. register_late_pass ( move || box disallowed_method:: DisallowedMethod :: new ( & disallowed_methods) ) ;
@@ -1293,6 +1323,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1293
1323
LintId :: of( & wildcard_imports:: ENUM_GLOB_USE ) ,
1294
1324
LintId :: of( & wildcard_imports:: WILDCARD_IMPORTS ) ,
1295
1325
] ) ;
1326
+ #[ cfg( feature = "internal-lints" ) ]
1296
1327
1297
1328
store. register_group ( true , "clippy::internal" , Some ( "clippy_internal" ) , vec ! [
1298
1329
LintId :: of( & utils:: internal_lints:: CLIPPY_LINTS_INTERNAL ) ,
0 commit comments