@@ -939,17 +939,23 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
939
939
& zero_div_zero:: ZERO_DIVIDED_BY_ZERO ,
940
940
] ) ;
941
941
// end register lints, do not remove this comment, it’s used in `update_lints`
942
- store . register_late_pass ( || box await_holding_invalid :: AwaitHolding ) ;
943
- store . register_late_pass ( || box serde_api :: SerdeAPI ) ;
942
+
943
+ // all the internal lints
944
944
#[ cfg( feature = "internal-lints" ) ]
945
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 ) ;
946
950
store. register_late_pass ( || box utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ;
951
+ store. register_late_pass ( || box utils:: internal_lints:: InvalidPaths ) ;
947
952
store. register_late_pass ( || box utils:: internal_lints:: LintWithoutLintPass :: default ( ) ) ;
953
+ store. register_late_pass ( || box utils:: internal_lints:: MatchTypeOnDiagItem ) ;
948
954
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
955
}
952
956
store. register_late_pass ( || box utils:: author:: Author ) ;
957
+ store. register_late_pass ( || box await_holding_invalid:: AwaitHolding ) ;
958
+ store. register_late_pass ( || box serde_api:: SerdeAPI ) ;
953
959
let vec_box_size_threshold = conf. vec_box_size_threshold ;
954
960
store. register_late_pass ( move || box types:: Types :: new ( vec_box_size_threshold) ) ;
955
961
store. register_late_pass ( || box booleans:: NonminimalBool ) ;
@@ -1134,8 +1140,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1134
1140
store. register_early_pass ( || box literal_representation:: LiteralDigitGrouping ) ;
1135
1141
let literal_representation_threshold = conf. literal_representation_threshold ;
1136
1142
store. register_early_pass ( move || box literal_representation:: DecimalLiteralRepresentation :: new ( literal_representation_threshold) ) ;
1137
- #[ cfg( feature = "internal-lints" ) ]
1138
- store. register_early_pass ( || box utils:: internal_lints:: ClippyLintsInternal ) ;
1139
1143
let enum_variant_name_threshold = conf. enum_variant_name_threshold ;
1140
1144
store. register_early_pass ( move || box enum_variants:: EnumVariantNames :: new ( enum_variant_name_threshold) ) ;
1141
1145
store. register_early_pass ( || box tabs_in_doc_comments:: TabsInDocComments ) ;
@@ -1149,8 +1153,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1149
1153
store. register_late_pass ( move || box large_const_arrays:: LargeConstArrays :: new ( array_size_threshold) ) ;
1150
1154
store. register_late_pass ( || box floating_point_arithmetic:: FloatingPointArithmetic ) ;
1151
1155
store. register_early_pass ( || box as_conversions:: AsConversions ) ;
1152
- #[ cfg( feature = "internal-lints" ) ]
1153
- store. register_early_pass ( || box utils:: internal_lints:: ProduceIce ) ;
1154
1156
store. register_late_pass ( || box let_underscore:: LetUnderscore ) ;
1155
1157
store. register_late_pass ( || box atomic_ordering:: AtomicOrdering ) ;
1156
1158
store. register_early_pass ( || box single_component_path_imports:: SingleComponentPathImports ) ;
@@ -1166,16 +1168,13 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1166
1168
store. register_late_pass ( || box dereference:: Dereferencing ) ;
1167
1169
store. register_late_pass ( || box option_if_let_else:: OptionIfLetElse ) ;
1168
1170
store. register_late_pass ( || box future_not_send:: FutureNotSend ) ;
1169
- #[ cfg( feature = "internal-lints" ) ]
1170
- store. register_late_pass ( || box utils:: internal_lints:: CollapsibleCalls ) ;
1171
1171
store. register_late_pass ( || box if_let_mutex:: IfLetMutex ) ;
1172
1172
store. register_late_pass ( || box mut_mutex_lock:: MutMutexLock ) ;
1173
1173
store. register_late_pass ( || box match_on_vec_items:: MatchOnVecItems ) ;
1174
1174
store. register_late_pass ( || box manual_async_fn:: ManualAsyncFn ) ;
1175
1175
store. register_early_pass ( || box redundant_field_names:: RedundantFieldNames ) ;
1176
1176
store. register_late_pass ( || box vec_resize_to_zero:: VecResizeToZero ) ;
1177
1177
store. register_late_pass ( || box panic_in_result_fn:: PanicInResultFn ) ;
1178
-
1179
1178
let single_char_binding_names_threshold = conf. single_char_binding_names_threshold ;
1180
1179
store. register_early_pass ( move || box non_expressive_names:: NonExpressiveNames {
1181
1180
single_char_binding_names_threshold,
@@ -1192,8 +1191,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1192
1191
store. register_late_pass ( || box manual_ok_or:: ManualOkOr ) ;
1193
1192
store. register_late_pass ( || box float_equality_without_abs:: FloatEqualityWithoutAbs ) ;
1194
1193
store. register_late_pass ( || box async_yields_async:: AsyncYieldsAsync ) ;
1195
- #[ cfg( feature = "internal-lints" ) ]
1196
- store. register_late_pass ( || box utils:: internal_lints:: MatchTypeOnDiagItem ) ;
1197
1194
let disallowed_methods = conf. disallowed_methods . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
1198
1195
store. register_late_pass ( move || box disallowed_method:: DisallowedMethod :: new ( & disallowed_methods) ) ;
1199
1196
store. register_early_pass ( || box asm_syntax:: InlineAsmX86AttSyntax ) ;
@@ -1202,7 +1199,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1202
1199
store. register_late_pass ( || box strings:: StrToString ) ;
1203
1200
store. register_late_pass ( || box strings:: StringToString ) ;
1204
1201
1205
-
1206
1202
store. register_group ( true , "clippy::restriction" , Some ( "clippy_restriction" ) , vec ! [
1207
1203
LintId :: of( & arithmetic:: FLOAT_ARITHMETIC ) ,
1208
1204
LintId :: of( & arithmetic:: INTEGER_ARITHMETIC ) ,
@@ -1333,6 +1329,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1333
1329
LintId :: of( & wildcard_imports:: ENUM_GLOB_USE ) ,
1334
1330
LintId :: of( & wildcard_imports:: WILDCARD_IMPORTS ) ,
1335
1331
] ) ;
1332
+
1336
1333
#[ cfg( feature = "internal-lints" ) ]
1337
1334
store. register_group ( true , "clippy::internal" , Some ( "clippy_internal" ) , vec ! [
1338
1335
LintId :: of( & utils:: internal_lints:: CLIPPY_LINTS_INTERNAL ) ,
0 commit comments