]> git.lizzy.rs Git - rust.git/blob - clippy_lints/src/lib.rs
Auto merge of #6765 - camsteffen:unnecessary-wraps-pedantic, r=flip1995
[rust.git] / clippy_lints / src / lib.rs
1 // error-pattern:cargo-clippy
2
3 #![feature(bindings_after_at)]
4 #![feature(box_patterns)]
5 #![feature(box_syntax)]
6 #![feature(concat_idents)]
7 #![feature(crate_visibility_modifier)]
8 #![feature(drain_filter)]
9 #![feature(in_band_lifetimes)]
10 #![feature(once_cell)]
11 #![feature(or_patterns)]
12 #![feature(rustc_private)]
13 #![feature(stmt_expr_attributes)]
14 #![feature(control_flow_enum)]
15 #![recursion_limit = "512"]
16 #![cfg_attr(feature = "deny-warnings", deny(warnings))]
17 #![allow(clippy::missing_docs_in_private_items, clippy::must_use_candidate)]
18 #![warn(trivial_casts, trivial_numeric_casts)]
19 // warn on lints, that are included in `rust-lang/rust`s bootstrap
20 #![warn(rust_2018_idioms, unused_lifetimes)]
21 // warn on rustc internal lints
22 #![deny(rustc::internal)]
23
24 // FIXME: switch to something more ergonomic here, once available.
25 // (Currently there is no way to opt into sysroot crates without `extern crate`.)
26 extern crate rustc_ast;
27 extern crate rustc_ast_pretty;
28 extern crate rustc_attr;
29 extern crate rustc_data_structures;
30 extern crate rustc_driver;
31 extern crate rustc_errors;
32 extern crate rustc_hir;
33 extern crate rustc_hir_pretty;
34 extern crate rustc_index;
35 extern crate rustc_infer;
36 extern crate rustc_lexer;
37 extern crate rustc_lint;
38 extern crate rustc_middle;
39 extern crate rustc_mir;
40 extern crate rustc_parse;
41 extern crate rustc_parse_format;
42 extern crate rustc_session;
43 extern crate rustc_span;
44 extern crate rustc_target;
45 extern crate rustc_trait_selection;
46 extern crate rustc_typeck;
47
48 use crate::utils::parse_msrv;
49 use rustc_data_structures::fx::FxHashSet;
50 use rustc_lint::LintId;
51 use rustc_session::Session;
52
53 /// Macro used to declare a Clippy lint.
54 ///
55 /// Every lint declaration consists of 4 parts:
56 ///
57 /// 1. The documentation, which is used for the website
58 /// 2. The `LINT_NAME`. See [lint naming][lint_naming] on lint naming conventions.
59 /// 3. The `lint_level`, which is a mapping from *one* of our lint groups to `Allow`, `Warn` or
60 ///    `Deny`. The lint level here has nothing to do with what lint groups the lint is a part of.
61 /// 4. The `description` that contains a short explanation on what's wrong with code where the
62 ///    lint is triggered.
63 ///
64 /// Currently the categories `style`, `correctness`, `complexity` and `perf` are enabled by default.
65 /// As said in the README.md of this repository, if the lint level mapping changes, please update
66 /// README.md.
67 ///
68 /// # Example
69 ///
70 /// ```
71 /// #![feature(rustc_private)]
72 /// extern crate rustc_session;
73 /// use rustc_session::declare_tool_lint;
74 /// use clippy_lints::declare_clippy_lint;
75 ///
76 /// declare_clippy_lint! {
77 ///     /// **What it does:** Checks for ... (describe what the lint matches).
78 ///     ///
79 ///     /// **Why is this bad?** Supply the reason for linting the code.
80 ///     ///
81 ///     /// **Known problems:** None. (Or describe where it could go wrong.)
82 ///     ///
83 ///     /// **Example:**
84 ///     ///
85 ///     /// ```rust
86 ///     /// // Bad
87 ///     /// Insert a short example of code that triggers the lint
88 ///     ///
89 ///     /// // Good
90 ///     /// Insert a short example of improved code that doesn't trigger the lint
91 ///     /// ```
92 ///     pub LINT_NAME,
93 ///     pedantic,
94 ///     "description"
95 /// }
96 /// ```
97 /// [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints
98 #[macro_export]
99 macro_rules! declare_clippy_lint {
100     { $(#[$attr:meta])* pub $name:tt, style, $description:tt } => {
101         declare_tool_lint! {
102             $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
103         }
104     };
105     { $(#[$attr:meta])* pub $name:tt, correctness, $description:tt } => {
106         declare_tool_lint! {
107             $(#[$attr])* pub clippy::$name, Deny, $description, report_in_external_macro: true
108         }
109     };
110     { $(#[$attr:meta])* pub $name:tt, complexity, $description:tt } => {
111         declare_tool_lint! {
112             $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
113         }
114     };
115     { $(#[$attr:meta])* pub $name:tt, perf, $description:tt } => {
116         declare_tool_lint! {
117             $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
118         }
119     };
120     { $(#[$attr:meta])* pub $name:tt, pedantic, $description:tt } => {
121         declare_tool_lint! {
122             $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
123         }
124     };
125     { $(#[$attr:meta])* pub $name:tt, restriction, $description:tt } => {
126         declare_tool_lint! {
127             $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
128         }
129     };
130     { $(#[$attr:meta])* pub $name:tt, cargo, $description:tt } => {
131         declare_tool_lint! {
132             $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
133         }
134     };
135     { $(#[$attr:meta])* pub $name:tt, nursery, $description:tt } => {
136         declare_tool_lint! {
137             $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
138         }
139     };
140     { $(#[$attr:meta])* pub $name:tt, internal, $description:tt } => {
141         declare_tool_lint! {
142             $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
143         }
144     };
145     { $(#[$attr:meta])* pub $name:tt, internal_warn, $description:tt } => {
146         declare_tool_lint! {
147             $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
148         }
149     };
150 }
151
152 mod consts;
153 #[macro_use]
154 mod utils;
155
156 // begin lints modules, do not remove this comment, it’s used in `update_lints`
157 mod approx_const;
158 mod arithmetic;
159 mod as_conversions;
160 mod asm_syntax;
161 mod assertions_on_constants;
162 mod assign_ops;
163 mod async_yields_async;
164 mod atomic_ordering;
165 mod attrs;
166 mod await_holding_invalid;
167 mod bit_mask;
168 mod blacklisted_name;
169 mod blocks_in_if_conditions;
170 mod booleans;
171 mod bytecount;
172 mod cargo_common_metadata;
173 mod case_sensitive_file_extension_comparisons;
174 mod checked_conversions;
175 mod cognitive_complexity;
176 mod collapsible_if;
177 mod collapsible_match;
178 mod comparison_chain;
179 mod copies;
180 mod copy_iterator;
181 mod create_dir;
182 mod dbg_macro;
183 mod default;
184 mod default_numeric_fallback;
185 mod dereference;
186 mod derive;
187 mod disallowed_method;
188 mod doc;
189 mod double_comparison;
190 mod double_parens;
191 mod drop_forget_ref;
192 mod duration_subsec;
193 mod else_if_without_else;
194 mod empty_enum;
195 mod entry;
196 mod enum_clike;
197 mod enum_variants;
198 mod eq_op;
199 mod erasing_op;
200 mod escape;
201 mod eta_reduction;
202 mod eval_order_dependence;
203 mod excessive_bools;
204 mod exhaustive_items;
205 mod exit;
206 mod explicit_write;
207 mod fallible_impl_from;
208 mod float_equality_without_abs;
209 mod float_literal;
210 mod floating_point_arithmetic;
211 mod format;
212 mod formatting;
213 mod from_over_into;
214 mod from_str_radix_10;
215 mod functions;
216 mod future_not_send;
217 mod get_last_with_len;
218 mod identity_op;
219 mod if_let_mutex;
220 mod if_let_some_result;
221 mod if_not_else;
222 mod implicit_return;
223 mod implicit_saturating_sub;
224 mod indexing_slicing;
225 mod infinite_iter;
226 mod inherent_impl;
227 mod inherent_to_string;
228 mod inline_fn_without_body;
229 mod int_plus_one;
230 mod integer_division;
231 mod items_after_statements;
232 mod large_const_arrays;
233 mod large_enum_variant;
234 mod large_stack_arrays;
235 mod len_zero;
236 mod let_if_seq;
237 mod let_underscore;
238 mod lifetimes;
239 mod literal_representation;
240 mod loops;
241 mod macro_use;
242 mod main_recursion;
243 mod manual_async_fn;
244 mod manual_non_exhaustive;
245 mod manual_ok_or;
246 mod manual_strip;
247 mod manual_unwrap_or;
248 mod map_clone;
249 mod map_err_ignore;
250 mod map_identity;
251 mod map_unit_fn;
252 mod match_on_vec_items;
253 mod matches;
254 mod mem_discriminant;
255 mod mem_forget;
256 mod mem_replace;
257 mod methods;
258 mod minmax;
259 mod misc;
260 mod misc_early;
261 mod missing_const_for_fn;
262 mod missing_doc;
263 mod missing_inline;
264 mod modulo_arithmetic;
265 mod multiple_crate_versions;
266 mod mut_key;
267 mod mut_mut;
268 mod mut_mutex_lock;
269 mod mut_reference;
270 mod mutable_debug_assertion;
271 mod mutex_atomic;
272 mod needless_arbitrary_self_type;
273 mod needless_bool;
274 mod needless_borrow;
275 mod needless_borrowed_ref;
276 mod needless_continue;
277 mod needless_pass_by_value;
278 mod needless_question_mark;
279 mod needless_update;
280 mod neg_cmp_op_on_partial_ord;
281 mod neg_multiply;
282 mod new_without_default;
283 mod no_effect;
284 mod non_copy_const;
285 mod non_expressive_names;
286 mod open_options;
287 mod option_env_unwrap;
288 mod option_if_let_else;
289 mod overflow_check_conditional;
290 mod panic_in_result_fn;
291 mod panic_unimplemented;
292 mod partialeq_ne_impl;
293 mod pass_by_ref_or_value;
294 mod path_buf_push_overwrite;
295 mod pattern_type_mismatch;
296 mod precedence;
297 mod ptr;
298 mod ptr_eq;
299 mod ptr_offset_with_cast;
300 mod question_mark;
301 mod ranges;
302 mod redundant_clone;
303 mod redundant_closure_call;
304 mod redundant_else;
305 mod redundant_field_names;
306 mod redundant_pub_crate;
307 mod redundant_slicing;
308 mod redundant_static_lifetimes;
309 mod ref_option_ref;
310 mod reference;
311 mod regex;
312 mod repeat_once;
313 mod returns;
314 mod self_assignment;
315 mod semicolon_if_nothing_returned;
316 mod serde_api;
317 mod shadow;
318 mod single_component_path_imports;
319 mod size_of_in_element_count;
320 mod slow_vector_initialization;
321 mod stable_sort_primitive;
322 mod strings;
323 mod suspicious_operation_groupings;
324 mod suspicious_trait_impl;
325 mod swap;
326 mod tabs_in_doc_comments;
327 mod temporary_assignment;
328 mod to_digit_is_some;
329 mod to_string_in_display;
330 mod trait_bounds;
331 mod transmute;
332 mod transmuting_null;
333 mod try_err;
334 mod types;
335 mod undropped_manually_drops;
336 mod unicode;
337 mod unit_return_expecting_ord;
338 mod unnamed_address;
339 mod unnecessary_sort_by;
340 mod unnecessary_wraps;
341 mod unnested_or_patterns;
342 mod unsafe_removed_from_name;
343 mod unused_io_amount;
344 mod unused_self;
345 mod unused_unit;
346 mod unwrap;
347 mod unwrap_in_result;
348 mod upper_case_acronyms;
349 mod use_self;
350 mod useless_conversion;
351 mod vec;
352 mod vec_init_then_push;
353 mod vec_resize_to_zero;
354 mod verbose_file_reads;
355 mod wildcard_dependencies;
356 mod wildcard_imports;
357 mod write;
358 mod zero_div_zero;
359 mod zero_sized_map_values;
360 // end lints modules, do not remove this comment, it’s used in `update_lints`
361
362 pub use crate::utils::conf::Conf;
363
364 /// Register all pre expansion lints
365 ///
366 /// Pre-expansion lints run before any macro expansion has happened.
367 ///
368 /// Note that due to the architecture of the compiler, currently `cfg_attr` attributes on crate
369 /// level (i.e `#![cfg_attr(...)]`) will still be expanded even when using a pre-expansion pass.
370 ///
371 /// Used in `./src/driver.rs`.
372 pub fn register_pre_expansion_lints(store: &mut rustc_lint::LintStore) {
373     store.register_pre_expansion_pass(|| box write::Write::default());
374     store.register_pre_expansion_pass(|| box attrs::EarlyAttributes);
375     store.register_pre_expansion_pass(|| box dbg_macro::DbgMacro);
376 }
377
378 #[doc(hidden)]
379 pub fn read_conf(args: &[rustc_ast::NestedMetaItem], sess: &Session) -> Conf {
380     use std::path::Path;
381     match utils::conf::file_from_args(args) {
382         Ok(file_name) => {
383             // if the user specified a file, it must exist, otherwise default to `clippy.toml` but
384             // do not require the file to exist
385             let file_name = match file_name {
386                 Some(file_name) => file_name,
387                 None => match utils::conf::lookup_conf_file() {
388                     Ok(Some(path)) => path,
389                     Ok(None) => return Conf::default(),
390                     Err(error) => {
391                         sess.struct_err(&format!("error finding Clippy's configuration file: {}", error))
392                             .emit();
393                         return Conf::default();
394                     },
395                 },
396             };
397
398             let file_name = if file_name.is_relative() {
399                 sess.local_crate_source_file
400                     .as_deref()
401                     .and_then(Path::parent)
402                     .unwrap_or_else(|| Path::new(""))
403                     .join(file_name)
404             } else {
405                 file_name
406             };
407
408             let (conf, errors) = utils::conf::read(&file_name);
409
410             // all conf errors are non-fatal, we just use the default conf in case of error
411             for error in errors {
412                 sess.struct_err(&format!(
413                     "error reading Clippy's configuration file `{}`: {}",
414                     file_name.display(),
415                     error
416                 ))
417                 .emit();
418             }
419
420             conf
421         },
422         Err((err, span)) => {
423             sess.struct_span_err(span, err)
424                 .span_note(span, "Clippy will use default configuration")
425                 .emit();
426             Conf::default()
427         },
428     }
429 }
430
431 /// Register all lints and lint groups with the rustc plugin registry
432 ///
433 /// Used in `./src/driver.rs`.
434 #[allow(clippy::too_many_lines)]
435 #[rustfmt::skip]
436 pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: &Conf) {
437     register_removed_non_tool_lints(store);
438
439     // begin deprecated lints, do not remove this comment, it’s used in `update_lints`
440     store.register_removed(
441         "clippy::should_assert_eq",
442         "`assert!()` will be more flexible with RFC 2011",
443     );
444     store.register_removed(
445         "clippy::extend_from_slice",
446         "`.extend_from_slice(_)` is a faster way to extend a Vec by a slice",
447     );
448     store.register_removed(
449         "clippy::range_step_by_zero",
450         "`iterator.step_by(0)` panics nowadays",
451     );
452     store.register_removed(
453         "clippy::unstable_as_slice",
454         "`Vec::as_slice` has been stabilized in 1.7",
455     );
456     store.register_removed(
457         "clippy::unstable_as_mut_slice",
458         "`Vec::as_mut_slice` has been stabilized in 1.7",
459     );
460     store.register_removed(
461         "clippy::misaligned_transmute",
462         "this lint has been split into cast_ptr_alignment and transmute_ptr_to_ptr",
463     );
464     store.register_removed(
465         "clippy::assign_ops",
466         "using compound assignment operators (e.g., `+=`) is harmless",
467     );
468     store.register_removed(
469         "clippy::if_let_redundant_pattern_matching",
470         "this lint has been changed to redundant_pattern_matching",
471     );
472     store.register_removed(
473         "clippy::unsafe_vector_initialization",
474         "the replacement suggested by this lint had substantially different behavior",
475     );
476     store.register_removed(
477         "clippy::invalid_ref",
478         "superseded by rustc lint `invalid_value`",
479     );
480     store.register_removed(
481         "clippy::unused_collect",
482         "`collect` has been marked as #[must_use] in rustc and that covers all cases of this lint",
483     );
484     store.register_removed(
485         "clippy::into_iter_on_array",
486         "this lint has been uplifted to rustc and is now called `array_into_iter`",
487     );
488     store.register_removed(
489         "clippy::unused_label",
490         "this lint has been uplifted to rustc and is now called `unused_labels`",
491     );
492     store.register_removed(
493         "clippy::replace_consts",
494         "associated-constants `MIN`/`MAX` of integers are preferred to `{min,max}_value()` and module constants",
495     );
496     store.register_removed(
497         "clippy::regex_macro",
498         "the regex! macro has been removed from the regex crate in 2018",
499     );
500     store.register_removed(
501         "clippy::drop_bounds",
502         "this lint has been uplifted to rustc and is now called `drop_bounds`",
503     );
504     store.register_removed(
505         "clippy::temporary_cstring_as_ptr",
506         "this lint has been uplifted to rustc and is now called `temporary_cstring_as_ptr`",
507     );
508     store.register_removed(
509         "clippy::panic_params",
510         "this lint has been uplifted to rustc and is now called `panic_fmt`",
511     );
512     store.register_removed(
513         "clippy::unknown_clippy_lints",
514         "this lint has been integrated into the `unknown_lints` rustc lint",
515     );
516     store.register_removed(
517         "clippy::find_map",
518         "this lint has been replaced by `manual_find_map`, a more specific lint",
519     );
520     // end deprecated lints, do not remove this comment, it’s used in `update_lints`
521
522     // begin register lints, do not remove this comment, it’s used in `update_lints`
523     store.register_lints(&[
524         #[cfg(feature = "internal-lints")]
525         &utils::internal_lints::CLIPPY_LINTS_INTERNAL,
526         #[cfg(feature = "internal-lints")]
527         &utils::internal_lints::COLLAPSIBLE_SPAN_LINT_CALLS,
528         #[cfg(feature = "internal-lints")]
529         &utils::internal_lints::COMPILER_LINT_FUNCTIONS,
530         #[cfg(feature = "internal-lints")]
531         &utils::internal_lints::DEFAULT_LINT,
532         #[cfg(feature = "internal-lints")]
533         &utils::internal_lints::INTERNING_DEFINED_SYMBOL,
534         #[cfg(feature = "internal-lints")]
535         &utils::internal_lints::INVALID_PATHS,
536         #[cfg(feature = "internal-lints")]
537         &utils::internal_lints::LINT_WITHOUT_LINT_PASS,
538         #[cfg(feature = "internal-lints")]
539         &utils::internal_lints::MATCH_TYPE_ON_DIAGNOSTIC_ITEM,
540         #[cfg(feature = "internal-lints")]
541         &utils::internal_lints::OUTER_EXPN_EXPN_DATA,
542         #[cfg(feature = "internal-lints")]
543         &utils::internal_lints::PRODUCE_ICE,
544         #[cfg(feature = "internal-lints")]
545         &utils::internal_lints::UNNECESSARY_SYMBOL_STR,
546         &approx_const::APPROX_CONSTANT,
547         &arithmetic::FLOAT_ARITHMETIC,
548         &arithmetic::INTEGER_ARITHMETIC,
549         &as_conversions::AS_CONVERSIONS,
550         &asm_syntax::INLINE_ASM_X86_ATT_SYNTAX,
551         &asm_syntax::INLINE_ASM_X86_INTEL_SYNTAX,
552         &assertions_on_constants::ASSERTIONS_ON_CONSTANTS,
553         &assign_ops::ASSIGN_OP_PATTERN,
554         &assign_ops::MISREFACTORED_ASSIGN_OP,
555         &async_yields_async::ASYNC_YIELDS_ASYNC,
556         &atomic_ordering::INVALID_ATOMIC_ORDERING,
557         &attrs::BLANKET_CLIPPY_RESTRICTION_LINTS,
558         &attrs::DEPRECATED_CFG_ATTR,
559         &attrs::DEPRECATED_SEMVER,
560         &attrs::EMPTY_LINE_AFTER_OUTER_ATTR,
561         &attrs::INLINE_ALWAYS,
562         &attrs::MISMATCHED_TARGET_OS,
563         &attrs::USELESS_ATTRIBUTE,
564         &await_holding_invalid::AWAIT_HOLDING_LOCK,
565         &await_holding_invalid::AWAIT_HOLDING_REFCELL_REF,
566         &bit_mask::BAD_BIT_MASK,
567         &bit_mask::INEFFECTIVE_BIT_MASK,
568         &bit_mask::VERBOSE_BIT_MASK,
569         &blacklisted_name::BLACKLISTED_NAME,
570         &blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS,
571         &booleans::LOGIC_BUG,
572         &booleans::NONMINIMAL_BOOL,
573         &bytecount::NAIVE_BYTECOUNT,
574         &cargo_common_metadata::CARGO_COMMON_METADATA,
575         &case_sensitive_file_extension_comparisons::CASE_SENSITIVE_FILE_EXTENSION_COMPARISONS,
576         &checked_conversions::CHECKED_CONVERSIONS,
577         &cognitive_complexity::COGNITIVE_COMPLEXITY,
578         &collapsible_if::COLLAPSIBLE_ELSE_IF,
579         &collapsible_if::COLLAPSIBLE_IF,
580         &collapsible_match::COLLAPSIBLE_MATCH,
581         &comparison_chain::COMPARISON_CHAIN,
582         &copies::IFS_SAME_COND,
583         &copies::IF_SAME_THEN_ELSE,
584         &copies::SAME_FUNCTIONS_IN_IF_CONDITION,
585         &copy_iterator::COPY_ITERATOR,
586         &create_dir::CREATE_DIR,
587         &dbg_macro::DBG_MACRO,
588         &default::DEFAULT_TRAIT_ACCESS,
589         &default::FIELD_REASSIGN_WITH_DEFAULT,
590         &default_numeric_fallback::DEFAULT_NUMERIC_FALLBACK,
591         &dereference::EXPLICIT_DEREF_METHODS,
592         &derive::DERIVE_HASH_XOR_EQ,
593         &derive::DERIVE_ORD_XOR_PARTIAL_ORD,
594         &derive::EXPL_IMPL_CLONE_ON_COPY,
595         &derive::UNSAFE_DERIVE_DESERIALIZE,
596         &disallowed_method::DISALLOWED_METHOD,
597         &doc::DOC_MARKDOWN,
598         &doc::MISSING_ERRORS_DOC,
599         &doc::MISSING_PANICS_DOC,
600         &doc::MISSING_SAFETY_DOC,
601         &doc::NEEDLESS_DOCTEST_MAIN,
602         &double_comparison::DOUBLE_COMPARISONS,
603         &double_parens::DOUBLE_PARENS,
604         &drop_forget_ref::DROP_COPY,
605         &drop_forget_ref::DROP_REF,
606         &drop_forget_ref::FORGET_COPY,
607         &drop_forget_ref::FORGET_REF,
608         &duration_subsec::DURATION_SUBSEC,
609         &else_if_without_else::ELSE_IF_WITHOUT_ELSE,
610         &empty_enum::EMPTY_ENUM,
611         &entry::MAP_ENTRY,
612         &enum_clike::ENUM_CLIKE_UNPORTABLE_VARIANT,
613         &enum_variants::ENUM_VARIANT_NAMES,
614         &enum_variants::MODULE_INCEPTION,
615         &enum_variants::MODULE_NAME_REPETITIONS,
616         &enum_variants::PUB_ENUM_VARIANT_NAMES,
617         &eq_op::EQ_OP,
618         &eq_op::OP_REF,
619         &erasing_op::ERASING_OP,
620         &escape::BOXED_LOCAL,
621         &eta_reduction::REDUNDANT_CLOSURE,
622         &eta_reduction::REDUNDANT_CLOSURE_FOR_METHOD_CALLS,
623         &eval_order_dependence::DIVERGING_SUB_EXPRESSION,
624         &eval_order_dependence::EVAL_ORDER_DEPENDENCE,
625         &excessive_bools::FN_PARAMS_EXCESSIVE_BOOLS,
626         &excessive_bools::STRUCT_EXCESSIVE_BOOLS,
627         &exhaustive_items::EXHAUSTIVE_ENUMS,
628         &exhaustive_items::EXHAUSTIVE_STRUCTS,
629         &exit::EXIT,
630         &explicit_write::EXPLICIT_WRITE,
631         &fallible_impl_from::FALLIBLE_IMPL_FROM,
632         &float_equality_without_abs::FLOAT_EQUALITY_WITHOUT_ABS,
633         &float_literal::EXCESSIVE_PRECISION,
634         &float_literal::LOSSY_FLOAT_LITERAL,
635         &floating_point_arithmetic::IMPRECISE_FLOPS,
636         &floating_point_arithmetic::SUBOPTIMAL_FLOPS,
637         &format::USELESS_FORMAT,
638         &formatting::POSSIBLE_MISSING_COMMA,
639         &formatting::SUSPICIOUS_ASSIGNMENT_FORMATTING,
640         &formatting::SUSPICIOUS_ELSE_FORMATTING,
641         &formatting::SUSPICIOUS_UNARY_OP_FORMATTING,
642         &from_over_into::FROM_OVER_INTO,
643         &from_str_radix_10::FROM_STR_RADIX_10,
644         &functions::DOUBLE_MUST_USE,
645         &functions::MUST_USE_CANDIDATE,
646         &functions::MUST_USE_UNIT,
647         &functions::NOT_UNSAFE_PTR_ARG_DEREF,
648         &functions::RESULT_UNIT_ERR,
649         &functions::TOO_MANY_ARGUMENTS,
650         &functions::TOO_MANY_LINES,
651         &future_not_send::FUTURE_NOT_SEND,
652         &get_last_with_len::GET_LAST_WITH_LEN,
653         &identity_op::IDENTITY_OP,
654         &if_let_mutex::IF_LET_MUTEX,
655         &if_let_some_result::IF_LET_SOME_RESULT,
656         &if_not_else::IF_NOT_ELSE,
657         &implicit_return::IMPLICIT_RETURN,
658         &implicit_saturating_sub::IMPLICIT_SATURATING_SUB,
659         &indexing_slicing::INDEXING_SLICING,
660         &indexing_slicing::OUT_OF_BOUNDS_INDEXING,
661         &infinite_iter::INFINITE_ITER,
662         &infinite_iter::MAYBE_INFINITE_ITER,
663         &inherent_impl::MULTIPLE_INHERENT_IMPL,
664         &inherent_to_string::INHERENT_TO_STRING,
665         &inherent_to_string::INHERENT_TO_STRING_SHADOW_DISPLAY,
666         &inline_fn_without_body::INLINE_FN_WITHOUT_BODY,
667         &int_plus_one::INT_PLUS_ONE,
668         &integer_division::INTEGER_DIVISION,
669         &items_after_statements::ITEMS_AFTER_STATEMENTS,
670         &large_const_arrays::LARGE_CONST_ARRAYS,
671         &large_enum_variant::LARGE_ENUM_VARIANT,
672         &large_stack_arrays::LARGE_STACK_ARRAYS,
673         &len_zero::COMPARISON_TO_EMPTY,
674         &len_zero::LEN_WITHOUT_IS_EMPTY,
675         &len_zero::LEN_ZERO,
676         &let_if_seq::USELESS_LET_IF_SEQ,
677         &let_underscore::LET_UNDERSCORE_DROP,
678         &let_underscore::LET_UNDERSCORE_LOCK,
679         &let_underscore::LET_UNDERSCORE_MUST_USE,
680         &lifetimes::EXTRA_UNUSED_LIFETIMES,
681         &lifetimes::NEEDLESS_LIFETIMES,
682         &literal_representation::DECIMAL_LITERAL_REPRESENTATION,
683         &literal_representation::INCONSISTENT_DIGIT_GROUPING,
684         &literal_representation::LARGE_DIGIT_GROUPS,
685         &literal_representation::MISTYPED_LITERAL_SUFFIXES,
686         &literal_representation::UNREADABLE_LITERAL,
687         &literal_representation::UNUSUAL_BYTE_GROUPINGS,
688         &loops::EMPTY_LOOP,
689         &loops::EXPLICIT_COUNTER_LOOP,
690         &loops::EXPLICIT_INTO_ITER_LOOP,
691         &loops::EXPLICIT_ITER_LOOP,
692         &loops::FOR_KV_MAP,
693         &loops::FOR_LOOPS_OVER_FALLIBLES,
694         &loops::ITER_NEXT_LOOP,
695         &loops::MANUAL_FLATTEN,
696         &loops::MANUAL_MEMCPY,
697         &loops::MUT_RANGE_BOUND,
698         &loops::NEEDLESS_COLLECT,
699         &loops::NEEDLESS_RANGE_LOOP,
700         &loops::NEVER_LOOP,
701         &loops::SAME_ITEM_PUSH,
702         &loops::SINGLE_ELEMENT_LOOP,
703         &loops::WHILE_IMMUTABLE_CONDITION,
704         &loops::WHILE_LET_LOOP,
705         &loops::WHILE_LET_ON_ITERATOR,
706         &macro_use::MACRO_USE_IMPORTS,
707         &main_recursion::MAIN_RECURSION,
708         &manual_async_fn::MANUAL_ASYNC_FN,
709         &manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE,
710         &manual_ok_or::MANUAL_OK_OR,
711         &manual_strip::MANUAL_STRIP,
712         &manual_unwrap_or::MANUAL_UNWRAP_OR,
713         &map_clone::MAP_CLONE,
714         &map_err_ignore::MAP_ERR_IGNORE,
715         &map_identity::MAP_IDENTITY,
716         &map_unit_fn::OPTION_MAP_UNIT_FN,
717         &map_unit_fn::RESULT_MAP_UNIT_FN,
718         &match_on_vec_items::MATCH_ON_VEC_ITEMS,
719         &matches::INFALLIBLE_DESTRUCTURING_MATCH,
720         &matches::MATCH_AS_REF,
721         &matches::MATCH_BOOL,
722         &matches::MATCH_LIKE_MATCHES_MACRO,
723         &matches::MATCH_OVERLAPPING_ARM,
724         &matches::MATCH_REF_PATS,
725         &matches::MATCH_SAME_ARMS,
726         &matches::MATCH_SINGLE_BINDING,
727         &matches::MATCH_WILDCARD_FOR_SINGLE_VARIANTS,
728         &matches::MATCH_WILD_ERR_ARM,
729         &matches::REDUNDANT_PATTERN_MATCHING,
730         &matches::REST_PAT_IN_FULLY_BOUND_STRUCTS,
731         &matches::SINGLE_MATCH,
732         &matches::SINGLE_MATCH_ELSE,
733         &matches::WILDCARD_ENUM_MATCH_ARM,
734         &matches::WILDCARD_IN_OR_PATTERNS,
735         &mem_discriminant::MEM_DISCRIMINANT_NON_ENUM,
736         &mem_forget::MEM_FORGET,
737         &mem_replace::MEM_REPLACE_OPTION_WITH_NONE,
738         &mem_replace::MEM_REPLACE_WITH_DEFAULT,
739         &mem_replace::MEM_REPLACE_WITH_UNINIT,
740         &methods::BIND_INSTEAD_OF_MAP,
741         &methods::BYTES_NTH,
742         &methods::CHARS_LAST_CMP,
743         &methods::CHARS_NEXT_CMP,
744         &methods::CLONE_DOUBLE_REF,
745         &methods::CLONE_ON_COPY,
746         &methods::CLONE_ON_REF_PTR,
747         &methods::EXPECT_FUN_CALL,
748         &methods::EXPECT_USED,
749         &methods::FILETYPE_IS_FILE,
750         &methods::FILTER_MAP,
751         &methods::FILTER_MAP_IDENTITY,
752         &methods::FILTER_MAP_NEXT,
753         &methods::FILTER_NEXT,
754         &methods::FLAT_MAP_IDENTITY,
755         &methods::FROM_ITER_INSTEAD_OF_COLLECT,
756         &methods::GET_UNWRAP,
757         &methods::INEFFICIENT_TO_STRING,
758         &methods::INSPECT_FOR_EACH,
759         &methods::INTO_ITER_ON_REF,
760         &methods::ITERATOR_STEP_BY_ZERO,
761         &methods::ITER_CLONED_COLLECT,
762         &methods::ITER_NEXT_SLICE,
763         &methods::ITER_NTH,
764         &methods::ITER_NTH_ZERO,
765         &methods::ITER_SKIP_NEXT,
766         &methods::MANUAL_FILTER_MAP,
767         &methods::MANUAL_FIND_MAP,
768         &methods::MANUAL_SATURATING_ARITHMETIC,
769         &methods::MAP_COLLECT_RESULT_UNIT,
770         &methods::MAP_FLATTEN,
771         &methods::MAP_UNWRAP_OR,
772         &methods::NEW_RET_NO_SELF,
773         &methods::OK_EXPECT,
774         &methods::OPTION_AS_REF_DEREF,
775         &methods::OPTION_MAP_OR_NONE,
776         &methods::OR_FUN_CALL,
777         &methods::RESULT_MAP_OR_INTO_OPTION,
778         &methods::SEARCH_IS_SOME,
779         &methods::SHOULD_IMPLEMENT_TRAIT,
780         &methods::SINGLE_CHAR_ADD_STR,
781         &methods::SINGLE_CHAR_PATTERN,
782         &methods::SKIP_WHILE_NEXT,
783         &methods::STRING_EXTEND_CHARS,
784         &methods::SUSPICIOUS_MAP,
785         &methods::UNINIT_ASSUMED_INIT,
786         &methods::UNNECESSARY_FILTER_MAP,
787         &methods::UNNECESSARY_FOLD,
788         &methods::UNNECESSARY_LAZY_EVALUATIONS,
789         &methods::UNWRAP_USED,
790         &methods::USELESS_ASREF,
791         &methods::WRONG_PUB_SELF_CONVENTION,
792         &methods::WRONG_SELF_CONVENTION,
793         &methods::ZST_OFFSET,
794         &minmax::MIN_MAX,
795         &misc::CMP_NAN,
796         &misc::CMP_OWNED,
797         &misc::FLOAT_CMP,
798         &misc::FLOAT_CMP_CONST,
799         &misc::MODULO_ONE,
800         &misc::SHORT_CIRCUIT_STATEMENT,
801         &misc::TOPLEVEL_REF_ARG,
802         &misc::USED_UNDERSCORE_BINDING,
803         &misc::ZERO_PTR,
804         &misc_early::BUILTIN_TYPE_SHADOW,
805         &misc_early::DOUBLE_NEG,
806         &misc_early::DUPLICATE_UNDERSCORE_ARGUMENT,
807         &misc_early::MIXED_CASE_HEX_LITERALS,
808         &misc_early::REDUNDANT_PATTERN,
809         &misc_early::UNNEEDED_FIELD_PATTERN,
810         &misc_early::UNNEEDED_WILDCARD_PATTERN,
811         &misc_early::UNSEPARATED_LITERAL_SUFFIX,
812         &misc_early::ZERO_PREFIXED_LITERAL,
813         &missing_const_for_fn::MISSING_CONST_FOR_FN,
814         &missing_doc::MISSING_DOCS_IN_PRIVATE_ITEMS,
815         &missing_inline::MISSING_INLINE_IN_PUBLIC_ITEMS,
816         &modulo_arithmetic::MODULO_ARITHMETIC,
817         &multiple_crate_versions::MULTIPLE_CRATE_VERSIONS,
818         &mut_key::MUTABLE_KEY_TYPE,
819         &mut_mut::MUT_MUT,
820         &mut_mutex_lock::MUT_MUTEX_LOCK,
821         &mut_reference::UNNECESSARY_MUT_PASSED,
822         &mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL,
823         &mutex_atomic::MUTEX_ATOMIC,
824         &mutex_atomic::MUTEX_INTEGER,
825         &needless_arbitrary_self_type::NEEDLESS_ARBITRARY_SELF_TYPE,
826         &needless_bool::BOOL_COMPARISON,
827         &needless_bool::NEEDLESS_BOOL,
828         &needless_borrow::NEEDLESS_BORROW,
829         &needless_borrowed_ref::NEEDLESS_BORROWED_REFERENCE,
830         &needless_continue::NEEDLESS_CONTINUE,
831         &needless_pass_by_value::NEEDLESS_PASS_BY_VALUE,
832         &needless_question_mark::NEEDLESS_QUESTION_MARK,
833         &needless_update::NEEDLESS_UPDATE,
834         &neg_cmp_op_on_partial_ord::NEG_CMP_OP_ON_PARTIAL_ORD,
835         &neg_multiply::NEG_MULTIPLY,
836         &new_without_default::NEW_WITHOUT_DEFAULT,
837         &no_effect::NO_EFFECT,
838         &no_effect::UNNECESSARY_OPERATION,
839         &non_copy_const::BORROW_INTERIOR_MUTABLE_CONST,
840         &non_copy_const::DECLARE_INTERIOR_MUTABLE_CONST,
841         &non_expressive_names::JUST_UNDERSCORES_AND_DIGITS,
842         &non_expressive_names::MANY_SINGLE_CHAR_NAMES,
843         &non_expressive_names::SIMILAR_NAMES,
844         &open_options::NONSENSICAL_OPEN_OPTIONS,
845         &option_env_unwrap::OPTION_ENV_UNWRAP,
846         &option_if_let_else::OPTION_IF_LET_ELSE,
847         &overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL,
848         &panic_in_result_fn::PANIC_IN_RESULT_FN,
849         &panic_unimplemented::PANIC,
850         &panic_unimplemented::TODO,
851         &panic_unimplemented::UNIMPLEMENTED,
852         &panic_unimplemented::UNREACHABLE,
853         &partialeq_ne_impl::PARTIALEQ_NE_IMPL,
854         &pass_by_ref_or_value::LARGE_TYPES_PASSED_BY_VALUE,
855         &pass_by_ref_or_value::TRIVIALLY_COPY_PASS_BY_REF,
856         &path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE,
857         &pattern_type_mismatch::PATTERN_TYPE_MISMATCH,
858         &precedence::PRECEDENCE,
859         &ptr::CMP_NULL,
860         &ptr::MUT_FROM_REF,
861         &ptr::PTR_ARG,
862         &ptr_eq::PTR_EQ,
863         &ptr_offset_with_cast::PTR_OFFSET_WITH_CAST,
864         &question_mark::QUESTION_MARK,
865         &ranges::MANUAL_RANGE_CONTAINS,
866         &ranges::RANGE_MINUS_ONE,
867         &ranges::RANGE_PLUS_ONE,
868         &ranges::RANGE_ZIP_WITH_LEN,
869         &ranges::REVERSED_EMPTY_RANGES,
870         &redundant_clone::REDUNDANT_CLONE,
871         &redundant_closure_call::REDUNDANT_CLOSURE_CALL,
872         &redundant_else::REDUNDANT_ELSE,
873         &redundant_field_names::REDUNDANT_FIELD_NAMES,
874         &redundant_pub_crate::REDUNDANT_PUB_CRATE,
875         &redundant_slicing::REDUNDANT_SLICING,
876         &redundant_static_lifetimes::REDUNDANT_STATIC_LIFETIMES,
877         &ref_option_ref::REF_OPTION_REF,
878         &reference::DEREF_ADDROF,
879         &reference::REF_IN_DEREF,
880         &regex::INVALID_REGEX,
881         &regex::TRIVIAL_REGEX,
882         &repeat_once::REPEAT_ONCE,
883         &returns::LET_AND_RETURN,
884         &returns::NEEDLESS_RETURN,
885         &self_assignment::SELF_ASSIGNMENT,
886         &semicolon_if_nothing_returned::SEMICOLON_IF_NOTHING_RETURNED,
887         &serde_api::SERDE_API_MISUSE,
888         &shadow::SHADOW_REUSE,
889         &shadow::SHADOW_SAME,
890         &shadow::SHADOW_UNRELATED,
891         &single_component_path_imports::SINGLE_COMPONENT_PATH_IMPORTS,
892         &size_of_in_element_count::SIZE_OF_IN_ELEMENT_COUNT,
893         &slow_vector_initialization::SLOW_VECTOR_INITIALIZATION,
894         &stable_sort_primitive::STABLE_SORT_PRIMITIVE,
895         &strings::STRING_ADD,
896         &strings::STRING_ADD_ASSIGN,
897         &strings::STRING_FROM_UTF8_AS_BYTES,
898         &strings::STRING_LIT_AS_BYTES,
899         &strings::STRING_TO_STRING,
900         &strings::STR_TO_STRING,
901         &suspicious_operation_groupings::SUSPICIOUS_OPERATION_GROUPINGS,
902         &suspicious_trait_impl::SUSPICIOUS_ARITHMETIC_IMPL,
903         &suspicious_trait_impl::SUSPICIOUS_OP_ASSIGN_IMPL,
904         &swap::ALMOST_SWAPPED,
905         &swap::MANUAL_SWAP,
906         &tabs_in_doc_comments::TABS_IN_DOC_COMMENTS,
907         &temporary_assignment::TEMPORARY_ASSIGNMENT,
908         &to_digit_is_some::TO_DIGIT_IS_SOME,
909         &to_string_in_display::TO_STRING_IN_DISPLAY,
910         &trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS,
911         &trait_bounds::TYPE_REPETITION_IN_BOUNDS,
912         &transmute::CROSSPOINTER_TRANSMUTE,
913         &transmute::TRANSMUTES_EXPRESSIBLE_AS_PTR_CASTS,
914         &transmute::TRANSMUTE_BYTES_TO_STR,
915         &transmute::TRANSMUTE_FLOAT_TO_INT,
916         &transmute::TRANSMUTE_INT_TO_BOOL,
917         &transmute::TRANSMUTE_INT_TO_CHAR,
918         &transmute::TRANSMUTE_INT_TO_FLOAT,
919         &transmute::TRANSMUTE_PTR_TO_PTR,
920         &transmute::TRANSMUTE_PTR_TO_REF,
921         &transmute::UNSOUND_COLLECTION_TRANSMUTE,
922         &transmute::USELESS_TRANSMUTE,
923         &transmute::WRONG_TRANSMUTE,
924         &transmuting_null::TRANSMUTING_NULL,
925         &try_err::TRY_ERR,
926         &types::ABSURD_EXTREME_COMPARISONS,
927         &types::BORROWED_BOX,
928         &types::BOX_VEC,
929         &types::CAST_LOSSLESS,
930         &types::CAST_POSSIBLE_TRUNCATION,
931         &types::CAST_POSSIBLE_WRAP,
932         &types::CAST_PRECISION_LOSS,
933         &types::CAST_PTR_ALIGNMENT,
934         &types::CAST_REF_TO_MUT,
935         &types::CAST_SIGN_LOSS,
936         &types::CHAR_LIT_AS_U8,
937         &types::FN_TO_NUMERIC_CAST,
938         &types::FN_TO_NUMERIC_CAST_WITH_TRUNCATION,
939         &types::IMPLICIT_HASHER,
940         &types::INVALID_UPCAST_COMPARISONS,
941         &types::LET_UNIT_VALUE,
942         &types::LINKEDLIST,
943         &types::OPTION_OPTION,
944         &types::PTR_AS_PTR,
945         &types::RC_BUFFER,
946         &types::REDUNDANT_ALLOCATION,
947         &types::TYPE_COMPLEXITY,
948         &types::UNIT_ARG,
949         &types::UNIT_CMP,
950         &types::UNNECESSARY_CAST,
951         &types::VEC_BOX,
952         &undropped_manually_drops::UNDROPPED_MANUALLY_DROPS,
953         &unicode::INVISIBLE_CHARACTERS,
954         &unicode::NON_ASCII_LITERAL,
955         &unicode::UNICODE_NOT_NFC,
956         &unit_return_expecting_ord::UNIT_RETURN_EXPECTING_ORD,
957         &unnamed_address::FN_ADDRESS_COMPARISONS,
958         &unnamed_address::VTABLE_ADDRESS_COMPARISONS,
959         &unnecessary_sort_by::UNNECESSARY_SORT_BY,
960         &unnecessary_wraps::UNNECESSARY_WRAPS,
961         &unnested_or_patterns::UNNESTED_OR_PATTERNS,
962         &unsafe_removed_from_name::UNSAFE_REMOVED_FROM_NAME,
963         &unused_io_amount::UNUSED_IO_AMOUNT,
964         &unused_self::UNUSED_SELF,
965         &unused_unit::UNUSED_UNIT,
966         &unwrap::PANICKING_UNWRAP,
967         &unwrap::UNNECESSARY_UNWRAP,
968         &unwrap_in_result::UNWRAP_IN_RESULT,
969         &upper_case_acronyms::UPPER_CASE_ACRONYMS,
970         &use_self::USE_SELF,
971         &useless_conversion::USELESS_CONVERSION,
972         &vec::USELESS_VEC,
973         &vec_init_then_push::VEC_INIT_THEN_PUSH,
974         &vec_resize_to_zero::VEC_RESIZE_TO_ZERO,
975         &verbose_file_reads::VERBOSE_FILE_READS,
976         &wildcard_dependencies::WILDCARD_DEPENDENCIES,
977         &wildcard_imports::ENUM_GLOB_USE,
978         &wildcard_imports::WILDCARD_IMPORTS,
979         &write::PRINTLN_EMPTY_STRING,
980         &write::PRINT_LITERAL,
981         &write::PRINT_STDERR,
982         &write::PRINT_STDOUT,
983         &write::PRINT_WITH_NEWLINE,
984         &write::USE_DEBUG,
985         &write::WRITELN_EMPTY_STRING,
986         &write::WRITE_LITERAL,
987         &write::WRITE_WITH_NEWLINE,
988         &zero_div_zero::ZERO_DIVIDED_BY_ZERO,
989         &zero_sized_map_values::ZERO_SIZED_MAP_VALUES,
990     ]);
991     // end register lints, do not remove this comment, it’s used in `update_lints`
992
993     // all the internal lints
994     #[cfg(feature = "internal-lints")]
995     {
996         store.register_early_pass(|| box utils::internal_lints::ClippyLintsInternal);
997         store.register_early_pass(|| box utils::internal_lints::ProduceIce);
998         store.register_late_pass(|| box utils::inspector::DeepCodeInspector);
999         store.register_late_pass(|| box utils::internal_lints::CollapsibleCalls);
1000         store.register_late_pass(|| box utils::internal_lints::CompilerLintFunctions::new());
1001         store.register_late_pass(|| box utils::internal_lints::InvalidPaths);
1002         store.register_late_pass(|| box utils::internal_lints::InterningDefinedSymbol::default());
1003         store.register_late_pass(|| box utils::internal_lints::LintWithoutLintPass::default());
1004         store.register_late_pass(|| box utils::internal_lints::MatchTypeOnDiagItem);
1005         store.register_late_pass(|| box utils::internal_lints::OuterExpnDataPass);
1006     }
1007     store.register_late_pass(|| box utils::author::Author);
1008     store.register_late_pass(|| box await_holding_invalid::AwaitHolding);
1009     store.register_late_pass(|| box serde_api::SerdeApi);
1010     let vec_box_size_threshold = conf.vec_box_size_threshold;
1011     store.register_late_pass(move || box types::Types::new(vec_box_size_threshold));
1012     store.register_late_pass(|| box booleans::NonminimalBool);
1013     store.register_late_pass(|| box eq_op::EqOp);
1014     store.register_late_pass(|| box enum_clike::UnportableVariant);
1015     store.register_late_pass(|| box float_literal::FloatLiteral);
1016     let verbose_bit_mask_threshold = conf.verbose_bit_mask_threshold;
1017     store.register_late_pass(move || box bit_mask::BitMask::new(verbose_bit_mask_threshold));
1018     store.register_late_pass(|| box ptr::Ptr);
1019     store.register_late_pass(|| box ptr_eq::PtrEq);
1020     store.register_late_pass(|| box needless_bool::NeedlessBool);
1021     store.register_late_pass(|| box needless_bool::BoolComparison);
1022     store.register_late_pass(|| box approx_const::ApproxConstant);
1023     store.register_late_pass(|| box misc::MiscLints);
1024     store.register_late_pass(|| box eta_reduction::EtaReduction);
1025     store.register_late_pass(|| box identity_op::IdentityOp);
1026     store.register_late_pass(|| box erasing_op::ErasingOp);
1027     store.register_late_pass(|| box mut_mut::MutMut);
1028     store.register_late_pass(|| box mut_reference::UnnecessaryMutPassed);
1029     store.register_late_pass(|| box len_zero::LenZero);
1030     store.register_late_pass(|| box attrs::Attributes);
1031     store.register_late_pass(|| box blocks_in_if_conditions::BlocksInIfConditions);
1032     store.register_late_pass(|| box collapsible_match::CollapsibleMatch);
1033     store.register_late_pass(|| box unicode::Unicode);
1034     store.register_late_pass(|| box unit_return_expecting_ord::UnitReturnExpectingOrd);
1035     store.register_late_pass(|| box strings::StringAdd);
1036     store.register_late_pass(|| box implicit_return::ImplicitReturn);
1037     store.register_late_pass(|| box implicit_saturating_sub::ImplicitSaturatingSub);
1038     store.register_late_pass(|| box default_numeric_fallback::DefaultNumericFallback);
1039
1040     let msrv = conf.msrv.as_ref().and_then(|s| {
1041         parse_msrv(s, None, None).or_else(|| {
1042             sess.err(&format!("error reading Clippy's configuration file. `{}` is not a valid Rust version", s));
1043             None
1044         })
1045     });
1046
1047     store.register_late_pass(move || box methods::Methods::new(msrv));
1048     store.register_late_pass(move || box matches::Matches::new(msrv));
1049     store.register_early_pass(move || box manual_non_exhaustive::ManualNonExhaustive::new(msrv));
1050     store.register_late_pass(move || box manual_strip::ManualStrip::new(msrv));
1051     store.register_early_pass(move || box redundant_static_lifetimes::RedundantStaticLifetimes::new(msrv));
1052     store.register_early_pass(move || box redundant_field_names::RedundantFieldNames::new(msrv));
1053     store.register_late_pass(move || box checked_conversions::CheckedConversions::new(msrv));
1054     store.register_late_pass(move || box mem_replace::MemReplace::new(msrv));
1055     store.register_late_pass(move || box ranges::Ranges::new(msrv));
1056     store.register_late_pass(move || box from_over_into::FromOverInto::new(msrv));
1057     store.register_late_pass(move || box use_self::UseSelf::new(msrv));
1058     store.register_late_pass(move || box missing_const_for_fn::MissingConstForFn::new(msrv));
1059     store.register_late_pass(move || box needless_question_mark::NeedlessQuestionMark::new(msrv));
1060
1061     store.register_late_pass(|| box size_of_in_element_count::SizeOfInElementCount);
1062     store.register_late_pass(|| box map_clone::MapClone);
1063     store.register_late_pass(|| box map_err_ignore::MapErrIgnore);
1064     store.register_late_pass(|| box shadow::Shadow);
1065     store.register_late_pass(|| box types::LetUnitValue);
1066     store.register_late_pass(|| box types::UnitCmp);
1067     store.register_late_pass(|| box loops::Loops);
1068     store.register_late_pass(|| box main_recursion::MainRecursion::default());
1069     store.register_late_pass(|| box lifetimes::Lifetimes);
1070     store.register_late_pass(|| box entry::HashMapPass);
1071     store.register_late_pass(|| box types::Casts);
1072     let type_complexity_threshold = conf.type_complexity_threshold;
1073     store.register_late_pass(move || box types::TypeComplexity::new(type_complexity_threshold));
1074     store.register_late_pass(|| box minmax::MinMaxPass);
1075     store.register_late_pass(|| box open_options::OpenOptions);
1076     store.register_late_pass(|| box zero_div_zero::ZeroDiv);
1077     store.register_late_pass(|| box mutex_atomic::Mutex);
1078     store.register_late_pass(|| box needless_update::NeedlessUpdate);
1079     store.register_late_pass(|| box needless_borrow::NeedlessBorrow::default());
1080     store.register_late_pass(|| box needless_borrowed_ref::NeedlessBorrowedRef);
1081     store.register_late_pass(|| box no_effect::NoEffect);
1082     store.register_late_pass(|| box temporary_assignment::TemporaryAssignment);
1083     store.register_late_pass(|| box transmute::Transmute);
1084     let cognitive_complexity_threshold = conf.cognitive_complexity_threshold;
1085     store.register_late_pass(move || box cognitive_complexity::CognitiveComplexity::new(cognitive_complexity_threshold));
1086     let too_large_for_stack = conf.too_large_for_stack;
1087     store.register_late_pass(move || box escape::BoxedLocal{too_large_for_stack});
1088     store.register_late_pass(move || box vec::UselessVec{too_large_for_stack});
1089     store.register_late_pass(|| box panic_unimplemented::PanicUnimplemented);
1090     store.register_late_pass(|| box strings::StringLitAsBytes);
1091     store.register_late_pass(|| box derive::Derive);
1092     store.register_late_pass(|| box types::CharLitAsU8);
1093     store.register_late_pass(|| box get_last_with_len::GetLastWithLen);
1094     store.register_late_pass(|| box drop_forget_ref::DropForgetRef);
1095     store.register_late_pass(|| box empty_enum::EmptyEnum);
1096     store.register_late_pass(|| box types::AbsurdExtremeComparisons);
1097     store.register_late_pass(|| box types::InvalidUpcastComparisons);
1098     store.register_late_pass(|| box regex::Regex::default());
1099     store.register_late_pass(|| box copies::CopyAndPaste);
1100     store.register_late_pass(|| box copy_iterator::CopyIterator);
1101     store.register_late_pass(|| box format::UselessFormat);
1102     store.register_late_pass(|| box swap::Swap);
1103     store.register_late_pass(|| box overflow_check_conditional::OverflowCheckConditional);
1104     store.register_late_pass(|| box new_without_default::NewWithoutDefault::default());
1105     let blacklisted_names = conf.blacklisted_names.iter().cloned().collect::<FxHashSet<_>>();
1106     store.register_late_pass(move || box blacklisted_name::BlacklistedName::new(blacklisted_names.clone()));
1107     let too_many_arguments_threshold1 = conf.too_many_arguments_threshold;
1108     let too_many_lines_threshold2 = conf.too_many_lines_threshold;
1109     store.register_late_pass(move || box functions::Functions::new(too_many_arguments_threshold1, too_many_lines_threshold2));
1110     let doc_valid_idents = conf.doc_valid_idents.iter().cloned().collect::<FxHashSet<_>>();
1111     store.register_late_pass(move || box doc::DocMarkdown::new(doc_valid_idents.clone()));
1112     store.register_late_pass(|| box neg_multiply::NegMultiply);
1113     store.register_late_pass(|| box mem_discriminant::MemDiscriminant);
1114     store.register_late_pass(|| box mem_forget::MemForget);
1115     store.register_late_pass(|| box arithmetic::Arithmetic::default());
1116     store.register_late_pass(|| box assign_ops::AssignOps);
1117     store.register_late_pass(|| box let_if_seq::LetIfSeq);
1118     store.register_late_pass(|| box eval_order_dependence::EvalOrderDependence);
1119     store.register_late_pass(|| box missing_doc::MissingDoc::new());
1120     store.register_late_pass(|| box missing_inline::MissingInline);
1121     store.register_late_pass(move || box exhaustive_items::ExhaustiveItems);
1122     store.register_late_pass(|| box if_let_some_result::OkIfLet);
1123     store.register_late_pass(|| box partialeq_ne_impl::PartialEqNeImpl);
1124     store.register_late_pass(|| box unused_io_amount::UnusedIoAmount);
1125     let enum_variant_size_threshold = conf.enum_variant_size_threshold;
1126     store.register_late_pass(move || box large_enum_variant::LargeEnumVariant::new(enum_variant_size_threshold));
1127     store.register_late_pass(|| box explicit_write::ExplicitWrite);
1128     store.register_late_pass(|| box needless_pass_by_value::NeedlessPassByValue);
1129     let pass_by_ref_or_value = pass_by_ref_or_value::PassByRefOrValue::new(
1130         conf.trivial_copy_size_limit,
1131         conf.pass_by_value_size_limit,
1132         &sess.target,
1133     );
1134     store.register_late_pass(move || box pass_by_ref_or_value);
1135     store.register_late_pass(|| box ref_option_ref::RefOptionRef);
1136     store.register_late_pass(|| box try_err::TryErr);
1137     store.register_late_pass(|| box bytecount::ByteCount);
1138     store.register_late_pass(|| box infinite_iter::InfiniteIter);
1139     store.register_late_pass(|| box inline_fn_without_body::InlineFnWithoutBody);
1140     store.register_late_pass(|| box useless_conversion::UselessConversion::default());
1141     store.register_late_pass(|| box types::ImplicitHasher);
1142     store.register_late_pass(|| box fallible_impl_from::FallibleImplFrom);
1143     store.register_late_pass(|| box types::UnitArg);
1144     store.register_late_pass(|| box double_comparison::DoubleComparisons);
1145     store.register_late_pass(|| box question_mark::QuestionMark);
1146     store.register_early_pass(|| box suspicious_operation_groupings::SuspiciousOperationGroupings);
1147     store.register_late_pass(|| box suspicious_trait_impl::SuspiciousImpl);
1148     store.register_late_pass(|| box map_unit_fn::MapUnit);
1149     store.register_late_pass(|| box inherent_impl::MultipleInherentImpl::default());
1150     store.register_late_pass(|| box neg_cmp_op_on_partial_ord::NoNegCompOpForPartialOrd);
1151     store.register_late_pass(|| box unwrap::Unwrap);
1152     store.register_late_pass(|| box duration_subsec::DurationSubsec);
1153     store.register_late_pass(|| box indexing_slicing::IndexingSlicing);
1154     store.register_late_pass(|| box non_copy_const::NonCopyConst);
1155     store.register_late_pass(|| box ptr_offset_with_cast::PtrOffsetWithCast);
1156     store.register_late_pass(|| box redundant_clone::RedundantClone);
1157     store.register_late_pass(|| box slow_vector_initialization::SlowVectorInit);
1158     store.register_late_pass(|| box unnecessary_sort_by::UnnecessarySortBy);
1159     store.register_late_pass(|| box unnecessary_wraps::UnnecessaryWraps);
1160     store.register_late_pass(|| box types::RefToMut);
1161     store.register_late_pass(|| box assertions_on_constants::AssertionsOnConstants);
1162     store.register_late_pass(|| box transmuting_null::TransmutingNull);
1163     store.register_late_pass(|| box path_buf_push_overwrite::PathBufPushOverwrite);
1164     store.register_late_pass(|| box integer_division::IntegerDivision);
1165     store.register_late_pass(|| box inherent_to_string::InherentToString);
1166     let max_trait_bounds = conf.max_trait_bounds;
1167     store.register_late_pass(move || box trait_bounds::TraitBounds::new(max_trait_bounds));
1168     store.register_late_pass(|| box comparison_chain::ComparisonChain);
1169     store.register_late_pass(|| box mut_key::MutableKeyType);
1170     store.register_late_pass(|| box modulo_arithmetic::ModuloArithmetic);
1171     store.register_early_pass(|| box reference::DerefAddrOf);
1172     store.register_early_pass(|| box reference::RefInDeref);
1173     store.register_early_pass(|| box double_parens::DoubleParens);
1174     store.register_late_pass(|| box to_string_in_display::ToStringInDisplay::new());
1175     store.register_early_pass(|| box unsafe_removed_from_name::UnsafeNameRemoval);
1176     store.register_early_pass(|| box if_not_else::IfNotElse);
1177     store.register_early_pass(|| box else_if_without_else::ElseIfWithoutElse);
1178     store.register_early_pass(|| box int_plus_one::IntPlusOne);
1179     store.register_early_pass(|| box formatting::Formatting);
1180     store.register_early_pass(|| box misc_early::MiscEarlyLints);
1181     store.register_early_pass(|| box redundant_closure_call::RedundantClosureCall);
1182     store.register_late_pass(|| box redundant_closure_call::RedundantClosureCall);
1183     store.register_early_pass(|| box unused_unit::UnusedUnit);
1184     store.register_late_pass(|| box returns::Return);
1185     store.register_early_pass(|| box collapsible_if::CollapsibleIf);
1186     store.register_early_pass(|| box items_after_statements::ItemsAfterStatements);
1187     store.register_early_pass(|| box precedence::Precedence);
1188     store.register_early_pass(|| box needless_continue::NeedlessContinue);
1189     store.register_early_pass(|| box redundant_else::RedundantElse);
1190     store.register_late_pass(|| box create_dir::CreateDir);
1191     store.register_early_pass(|| box needless_arbitrary_self_type::NeedlessArbitrarySelfType);
1192     let cargo_ignore_publish = conf.cargo_ignore_publish;
1193     store.register_late_pass(move || box cargo_common_metadata::CargoCommonMetadata::new(cargo_ignore_publish));
1194     store.register_late_pass(|| box multiple_crate_versions::MultipleCrateVersions);
1195     store.register_late_pass(|| box wildcard_dependencies::WildcardDependencies);
1196     let literal_representation_lint_fraction_readability = conf.unreadable_literal_lint_fractions;
1197     store.register_early_pass(move || box literal_representation::LiteralDigitGrouping::new(literal_representation_lint_fraction_readability));
1198     let literal_representation_threshold = conf.literal_representation_threshold;
1199     store.register_early_pass(move || box literal_representation::DecimalLiteralRepresentation::new(literal_representation_threshold));
1200     let enum_variant_name_threshold = conf.enum_variant_name_threshold;
1201     store.register_early_pass(move || box enum_variants::EnumVariantNames::new(enum_variant_name_threshold));
1202     store.register_early_pass(|| box tabs_in_doc_comments::TabsInDocComments);
1203     store.register_early_pass(|| box upper_case_acronyms::UpperCaseAcronyms);
1204     store.register_late_pass(|| box default::Default::default());
1205     store.register_late_pass(|| box unused_self::UnusedSelf);
1206     store.register_late_pass(|| box mutable_debug_assertion::DebugAssertWithMutCall);
1207     store.register_late_pass(|| box exit::Exit);
1208     store.register_late_pass(|| box to_digit_is_some::ToDigitIsSome);
1209     let array_size_threshold = conf.array_size_threshold;
1210     store.register_late_pass(move || box large_stack_arrays::LargeStackArrays::new(array_size_threshold));
1211     store.register_late_pass(move || box large_const_arrays::LargeConstArrays::new(array_size_threshold));
1212     store.register_late_pass(|| box floating_point_arithmetic::FloatingPointArithmetic);
1213     store.register_early_pass(|| box as_conversions::AsConversions);
1214     store.register_late_pass(|| box let_underscore::LetUnderscore);
1215     store.register_late_pass(|| box atomic_ordering::AtomicOrdering);
1216     store.register_early_pass(|| box single_component_path_imports::SingleComponentPathImports);
1217     let max_fn_params_bools = conf.max_fn_params_bools;
1218     let max_struct_bools = conf.max_struct_bools;
1219     store.register_early_pass(move || box excessive_bools::ExcessiveBools::new(max_struct_bools, max_fn_params_bools));
1220     store.register_early_pass(|| box option_env_unwrap::OptionEnvUnwrap);
1221     let warn_on_all_wildcard_imports = conf.warn_on_all_wildcard_imports;
1222     store.register_late_pass(move || box wildcard_imports::WildcardImports::new(warn_on_all_wildcard_imports));
1223     store.register_late_pass(|| box verbose_file_reads::VerboseFileReads);
1224     store.register_late_pass(|| box redundant_pub_crate::RedundantPubCrate::default());
1225     store.register_late_pass(|| box unnamed_address::UnnamedAddress);
1226     store.register_late_pass(|| box dereference::Dereferencing);
1227     store.register_late_pass(|| box option_if_let_else::OptionIfLetElse);
1228     store.register_late_pass(|| box future_not_send::FutureNotSend);
1229     store.register_late_pass(|| box if_let_mutex::IfLetMutex);
1230     store.register_late_pass(|| box mut_mutex_lock::MutMutexLock);
1231     store.register_late_pass(|| box match_on_vec_items::MatchOnVecItems);
1232     store.register_late_pass(|| box manual_async_fn::ManualAsyncFn);
1233     store.register_late_pass(|| box vec_resize_to_zero::VecResizeToZero);
1234     store.register_late_pass(|| box panic_in_result_fn::PanicInResultFn);
1235     let single_char_binding_names_threshold = conf.single_char_binding_names_threshold;
1236     store.register_early_pass(move || box non_expressive_names::NonExpressiveNames {
1237         single_char_binding_names_threshold,
1238     });
1239     store.register_early_pass(|| box unnested_or_patterns::UnnestedOrPatterns);
1240     store.register_late_pass(|| box macro_use::MacroUseImports::default());
1241     store.register_late_pass(|| box map_identity::MapIdentity);
1242     store.register_late_pass(|| box pattern_type_mismatch::PatternTypeMismatch);
1243     store.register_late_pass(|| box stable_sort_primitive::StableSortPrimitive);
1244     store.register_late_pass(|| box repeat_once::RepeatOnce);
1245     store.register_late_pass(|| box unwrap_in_result::UnwrapInResult);
1246     store.register_late_pass(|| box self_assignment::SelfAssignment);
1247     store.register_late_pass(|| box manual_unwrap_or::ManualUnwrapOr);
1248     store.register_late_pass(|| box manual_ok_or::ManualOkOr);
1249     store.register_late_pass(|| box float_equality_without_abs::FloatEqualityWithoutAbs);
1250     store.register_late_pass(|| box semicolon_if_nothing_returned::SemicolonIfNothingReturned);
1251     store.register_late_pass(|| box async_yields_async::AsyncYieldsAsync);
1252     let disallowed_methods = conf.disallowed_methods.iter().cloned().collect::<FxHashSet<_>>();
1253     store.register_late_pass(move || box disallowed_method::DisallowedMethod::new(&disallowed_methods));
1254     store.register_early_pass(|| box asm_syntax::InlineAsmX86AttSyntax);
1255     store.register_early_pass(|| box asm_syntax::InlineAsmX86IntelSyntax);
1256     store.register_late_pass(|| box undropped_manually_drops::UndroppedManuallyDrops);
1257     store.register_late_pass(|| box strings::StrToString);
1258     store.register_late_pass(|| box strings::StringToString);
1259     store.register_late_pass(|| box zero_sized_map_values::ZeroSizedMapValues);
1260     store.register_late_pass(|| box vec_init_then_push::VecInitThenPush::default());
1261     store.register_late_pass(move || box types::PtrAsPtr::new(msrv));
1262     store.register_late_pass(|| box case_sensitive_file_extension_comparisons::CaseSensitiveFileExtensionComparisons);
1263     store.register_late_pass(|| box redundant_slicing::RedundantSlicing);
1264     store.register_late_pass(|| box from_str_radix_10::FromStrRadix10);
1265
1266     store.register_group(true, "clippy::restriction", Some("clippy_restriction"), vec![
1267         LintId::of(&arithmetic::FLOAT_ARITHMETIC),
1268         LintId::of(&arithmetic::INTEGER_ARITHMETIC),
1269         LintId::of(&as_conversions::AS_CONVERSIONS),
1270         LintId::of(&asm_syntax::INLINE_ASM_X86_ATT_SYNTAX),
1271         LintId::of(&asm_syntax::INLINE_ASM_X86_INTEL_SYNTAX),
1272         LintId::of(&create_dir::CREATE_DIR),
1273         LintId::of(&dbg_macro::DBG_MACRO),
1274         LintId::of(&default_numeric_fallback::DEFAULT_NUMERIC_FALLBACK),
1275         LintId::of(&else_if_without_else::ELSE_IF_WITHOUT_ELSE),
1276         LintId::of(&exhaustive_items::EXHAUSTIVE_ENUMS),
1277         LintId::of(&exhaustive_items::EXHAUSTIVE_STRUCTS),
1278         LintId::of(&exit::EXIT),
1279         LintId::of(&float_literal::LOSSY_FLOAT_LITERAL),
1280         LintId::of(&implicit_return::IMPLICIT_RETURN),
1281         LintId::of(&indexing_slicing::INDEXING_SLICING),
1282         LintId::of(&inherent_impl::MULTIPLE_INHERENT_IMPL),
1283         LintId::of(&integer_division::INTEGER_DIVISION),
1284         LintId::of(&let_underscore::LET_UNDERSCORE_MUST_USE),
1285         LintId::of(&literal_representation::DECIMAL_LITERAL_REPRESENTATION),
1286         LintId::of(&map_err_ignore::MAP_ERR_IGNORE),
1287         LintId::of(&matches::REST_PAT_IN_FULLY_BOUND_STRUCTS),
1288         LintId::of(&matches::WILDCARD_ENUM_MATCH_ARM),
1289         LintId::of(&mem_forget::MEM_FORGET),
1290         LintId::of(&methods::CLONE_ON_REF_PTR),
1291         LintId::of(&methods::EXPECT_USED),
1292         LintId::of(&methods::FILETYPE_IS_FILE),
1293         LintId::of(&methods::GET_UNWRAP),
1294         LintId::of(&methods::UNWRAP_USED),
1295         LintId::of(&methods::WRONG_PUB_SELF_CONVENTION),
1296         LintId::of(&misc::FLOAT_CMP_CONST),
1297         LintId::of(&misc_early::UNNEEDED_FIELD_PATTERN),
1298         LintId::of(&missing_doc::MISSING_DOCS_IN_PRIVATE_ITEMS),
1299         LintId::of(&missing_inline::MISSING_INLINE_IN_PUBLIC_ITEMS),
1300         LintId::of(&modulo_arithmetic::MODULO_ARITHMETIC),
1301         LintId::of(&panic_in_result_fn::PANIC_IN_RESULT_FN),
1302         LintId::of(&panic_unimplemented::PANIC),
1303         LintId::of(&panic_unimplemented::TODO),
1304         LintId::of(&panic_unimplemented::UNIMPLEMENTED),
1305         LintId::of(&panic_unimplemented::UNREACHABLE),
1306         LintId::of(&pattern_type_mismatch::PATTERN_TYPE_MISMATCH),
1307         LintId::of(&semicolon_if_nothing_returned::SEMICOLON_IF_NOTHING_RETURNED),
1308         LintId::of(&shadow::SHADOW_REUSE),
1309         LintId::of(&shadow::SHADOW_SAME),
1310         LintId::of(&strings::STRING_ADD),
1311         LintId::of(&strings::STRING_TO_STRING),
1312         LintId::of(&strings::STR_TO_STRING),
1313         LintId::of(&types::RC_BUFFER),
1314         LintId::of(&unwrap_in_result::UNWRAP_IN_RESULT),
1315         LintId::of(&verbose_file_reads::VERBOSE_FILE_READS),
1316         LintId::of(&write::PRINT_STDERR),
1317         LintId::of(&write::PRINT_STDOUT),
1318         LintId::of(&write::USE_DEBUG),
1319     ]);
1320
1321     store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
1322         LintId::of(&attrs::INLINE_ALWAYS),
1323         LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1324         LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
1325         LintId::of(&bit_mask::VERBOSE_BIT_MASK),
1326         LintId::of(&case_sensitive_file_extension_comparisons::CASE_SENSITIVE_FILE_EXTENSION_COMPARISONS),
1327         LintId::of(&checked_conversions::CHECKED_CONVERSIONS),
1328         LintId::of(&copies::SAME_FUNCTIONS_IN_IF_CONDITION),
1329         LintId::of(&copy_iterator::COPY_ITERATOR),
1330         LintId::of(&default::DEFAULT_TRAIT_ACCESS),
1331         LintId::of(&dereference::EXPLICIT_DEREF_METHODS),
1332         LintId::of(&derive::EXPL_IMPL_CLONE_ON_COPY),
1333         LintId::of(&derive::UNSAFE_DERIVE_DESERIALIZE),
1334         LintId::of(&doc::DOC_MARKDOWN),
1335         LintId::of(&doc::MISSING_ERRORS_DOC),
1336         LintId::of(&doc::MISSING_PANICS_DOC),
1337         LintId::of(&empty_enum::EMPTY_ENUM),
1338         LintId::of(&enum_variants::MODULE_NAME_REPETITIONS),
1339         LintId::of(&enum_variants::PUB_ENUM_VARIANT_NAMES),
1340         LintId::of(&eta_reduction::REDUNDANT_CLOSURE_FOR_METHOD_CALLS),
1341         LintId::of(&excessive_bools::FN_PARAMS_EXCESSIVE_BOOLS),
1342         LintId::of(&excessive_bools::STRUCT_EXCESSIVE_BOOLS),
1343         LintId::of(&functions::MUST_USE_CANDIDATE),
1344         LintId::of(&functions::TOO_MANY_LINES),
1345         LintId::of(&if_not_else::IF_NOT_ELSE),
1346         LintId::of(&implicit_saturating_sub::IMPLICIT_SATURATING_SUB),
1347         LintId::of(&infinite_iter::MAYBE_INFINITE_ITER),
1348         LintId::of(&items_after_statements::ITEMS_AFTER_STATEMENTS),
1349         LintId::of(&large_stack_arrays::LARGE_STACK_ARRAYS),
1350         LintId::of(&let_underscore::LET_UNDERSCORE_DROP),
1351         LintId::of(&literal_representation::LARGE_DIGIT_GROUPS),
1352         LintId::of(&literal_representation::UNREADABLE_LITERAL),
1353         LintId::of(&loops::EXPLICIT_INTO_ITER_LOOP),
1354         LintId::of(&loops::EXPLICIT_ITER_LOOP),
1355         LintId::of(&macro_use::MACRO_USE_IMPORTS),
1356         LintId::of(&manual_ok_or::MANUAL_OK_OR),
1357         LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
1358         LintId::of(&matches::MATCH_BOOL),
1359         LintId::of(&matches::MATCH_SAME_ARMS),
1360         LintId::of(&matches::MATCH_WILDCARD_FOR_SINGLE_VARIANTS),
1361         LintId::of(&matches::MATCH_WILD_ERR_ARM),
1362         LintId::of(&matches::SINGLE_MATCH_ELSE),
1363         LintId::of(&methods::FILTER_MAP),
1364         LintId::of(&methods::FILTER_MAP_NEXT),
1365         LintId::of(&methods::INEFFICIENT_TO_STRING),
1366         LintId::of(&methods::MAP_FLATTEN),
1367         LintId::of(&methods::MAP_UNWRAP_OR),
1368         LintId::of(&misc::USED_UNDERSCORE_BINDING),
1369         LintId::of(&misc_early::UNSEPARATED_LITERAL_SUFFIX),
1370         LintId::of(&mut_mut::MUT_MUT),
1371         LintId::of(&needless_continue::NEEDLESS_CONTINUE),
1372         LintId::of(&needless_pass_by_value::NEEDLESS_PASS_BY_VALUE),
1373         LintId::of(&non_expressive_names::SIMILAR_NAMES),
1374         LintId::of(&option_if_let_else::OPTION_IF_LET_ELSE),
1375         LintId::of(&pass_by_ref_or_value::LARGE_TYPES_PASSED_BY_VALUE),
1376         LintId::of(&pass_by_ref_or_value::TRIVIALLY_COPY_PASS_BY_REF),
1377         LintId::of(&ranges::RANGE_MINUS_ONE),
1378         LintId::of(&ranges::RANGE_PLUS_ONE),
1379         LintId::of(&redundant_else::REDUNDANT_ELSE),
1380         LintId::of(&ref_option_ref::REF_OPTION_REF),
1381         LintId::of(&shadow::SHADOW_UNRELATED),
1382         LintId::of(&strings::STRING_ADD_ASSIGN),
1383         LintId::of(&trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
1384         LintId::of(&trait_bounds::TYPE_REPETITION_IN_BOUNDS),
1385         LintId::of(&types::CAST_LOSSLESS),
1386         LintId::of(&types::CAST_POSSIBLE_TRUNCATION),
1387         LintId::of(&types::CAST_POSSIBLE_WRAP),
1388         LintId::of(&types::CAST_PRECISION_LOSS),
1389         LintId::of(&types::CAST_PTR_ALIGNMENT),
1390         LintId::of(&types::CAST_SIGN_LOSS),
1391         LintId::of(&types::IMPLICIT_HASHER),
1392         LintId::of(&types::INVALID_UPCAST_COMPARISONS),
1393         LintId::of(&types::LET_UNIT_VALUE),
1394         LintId::of(&types::LINKEDLIST),
1395         LintId::of(&types::OPTION_OPTION),
1396         LintId::of(&types::PTR_AS_PTR),
1397         LintId::of(&unicode::NON_ASCII_LITERAL),
1398         LintId::of(&unicode::UNICODE_NOT_NFC),
1399         LintId::of(&unnecessary_wraps::UNNECESSARY_WRAPS),
1400         LintId::of(&unnested_or_patterns::UNNESTED_OR_PATTERNS),
1401         LintId::of(&unused_self::UNUSED_SELF),
1402         LintId::of(&wildcard_imports::ENUM_GLOB_USE),
1403         LintId::of(&wildcard_imports::WILDCARD_IMPORTS),
1404         LintId::of(&zero_sized_map_values::ZERO_SIZED_MAP_VALUES),
1405     ]);
1406
1407     #[cfg(feature = "internal-lints")]
1408     store.register_group(true, "clippy::internal", Some("clippy_internal"), vec![
1409         LintId::of(&utils::internal_lints::CLIPPY_LINTS_INTERNAL),
1410         LintId::of(&utils::internal_lints::COLLAPSIBLE_SPAN_LINT_CALLS),
1411         LintId::of(&utils::internal_lints::COMPILER_LINT_FUNCTIONS),
1412         LintId::of(&utils::internal_lints::DEFAULT_LINT),
1413         LintId::of(&utils::internal_lints::INTERNING_DEFINED_SYMBOL),
1414         LintId::of(&utils::internal_lints::INVALID_PATHS),
1415         LintId::of(&utils::internal_lints::LINT_WITHOUT_LINT_PASS),
1416         LintId::of(&utils::internal_lints::MATCH_TYPE_ON_DIAGNOSTIC_ITEM),
1417         LintId::of(&utils::internal_lints::OUTER_EXPN_EXPN_DATA),
1418         LintId::of(&utils::internal_lints::PRODUCE_ICE),
1419         LintId::of(&utils::internal_lints::UNNECESSARY_SYMBOL_STR),
1420     ]);
1421
1422     store.register_group(true, "clippy::all", Some("clippy"), vec![
1423         LintId::of(&approx_const::APPROX_CONSTANT),
1424         LintId::of(&assertions_on_constants::ASSERTIONS_ON_CONSTANTS),
1425         LintId::of(&assign_ops::ASSIGN_OP_PATTERN),
1426         LintId::of(&assign_ops::MISREFACTORED_ASSIGN_OP),
1427         LintId::of(&async_yields_async::ASYNC_YIELDS_ASYNC),
1428         LintId::of(&atomic_ordering::INVALID_ATOMIC_ORDERING),
1429         LintId::of(&attrs::BLANKET_CLIPPY_RESTRICTION_LINTS),
1430         LintId::of(&attrs::DEPRECATED_CFG_ATTR),
1431         LintId::of(&attrs::DEPRECATED_SEMVER),
1432         LintId::of(&attrs::MISMATCHED_TARGET_OS),
1433         LintId::of(&attrs::USELESS_ATTRIBUTE),
1434         LintId::of(&bit_mask::BAD_BIT_MASK),
1435         LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
1436         LintId::of(&blacklisted_name::BLACKLISTED_NAME),
1437         LintId::of(&blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS),
1438         LintId::of(&booleans::LOGIC_BUG),
1439         LintId::of(&booleans::NONMINIMAL_BOOL),
1440         LintId::of(&bytecount::NAIVE_BYTECOUNT),
1441         LintId::of(&collapsible_if::COLLAPSIBLE_ELSE_IF),
1442         LintId::of(&collapsible_if::COLLAPSIBLE_IF),
1443         LintId::of(&collapsible_match::COLLAPSIBLE_MATCH),
1444         LintId::of(&comparison_chain::COMPARISON_CHAIN),
1445         LintId::of(&copies::IFS_SAME_COND),
1446         LintId::of(&copies::IF_SAME_THEN_ELSE),
1447         LintId::of(&default::FIELD_REASSIGN_WITH_DEFAULT),
1448         LintId::of(&derive::DERIVE_HASH_XOR_EQ),
1449         LintId::of(&derive::DERIVE_ORD_XOR_PARTIAL_ORD),
1450         LintId::of(&doc::MISSING_SAFETY_DOC),
1451         LintId::of(&doc::NEEDLESS_DOCTEST_MAIN),
1452         LintId::of(&double_comparison::DOUBLE_COMPARISONS),
1453         LintId::of(&double_parens::DOUBLE_PARENS),
1454         LintId::of(&drop_forget_ref::DROP_COPY),
1455         LintId::of(&drop_forget_ref::DROP_REF),
1456         LintId::of(&drop_forget_ref::FORGET_COPY),
1457         LintId::of(&drop_forget_ref::FORGET_REF),
1458         LintId::of(&duration_subsec::DURATION_SUBSEC),
1459         LintId::of(&entry::MAP_ENTRY),
1460         LintId::of(&enum_clike::ENUM_CLIKE_UNPORTABLE_VARIANT),
1461         LintId::of(&enum_variants::ENUM_VARIANT_NAMES),
1462         LintId::of(&enum_variants::MODULE_INCEPTION),
1463         LintId::of(&eq_op::EQ_OP),
1464         LintId::of(&eq_op::OP_REF),
1465         LintId::of(&erasing_op::ERASING_OP),
1466         LintId::of(&escape::BOXED_LOCAL),
1467         LintId::of(&eta_reduction::REDUNDANT_CLOSURE),
1468         LintId::of(&eval_order_dependence::DIVERGING_SUB_EXPRESSION),
1469         LintId::of(&eval_order_dependence::EVAL_ORDER_DEPENDENCE),
1470         LintId::of(&explicit_write::EXPLICIT_WRITE),
1471         LintId::of(&float_equality_without_abs::FLOAT_EQUALITY_WITHOUT_ABS),
1472         LintId::of(&float_literal::EXCESSIVE_PRECISION),
1473         LintId::of(&format::USELESS_FORMAT),
1474         LintId::of(&formatting::POSSIBLE_MISSING_COMMA),
1475         LintId::of(&formatting::SUSPICIOUS_ASSIGNMENT_FORMATTING),
1476         LintId::of(&formatting::SUSPICIOUS_ELSE_FORMATTING),
1477         LintId::of(&formatting::SUSPICIOUS_UNARY_OP_FORMATTING),
1478         LintId::of(&from_over_into::FROM_OVER_INTO),
1479         LintId::of(&from_str_radix_10::FROM_STR_RADIX_10),
1480         LintId::of(&functions::DOUBLE_MUST_USE),
1481         LintId::of(&functions::MUST_USE_UNIT),
1482         LintId::of(&functions::NOT_UNSAFE_PTR_ARG_DEREF),
1483         LintId::of(&functions::RESULT_UNIT_ERR),
1484         LintId::of(&functions::TOO_MANY_ARGUMENTS),
1485         LintId::of(&get_last_with_len::GET_LAST_WITH_LEN),
1486         LintId::of(&identity_op::IDENTITY_OP),
1487         LintId::of(&if_let_mutex::IF_LET_MUTEX),
1488         LintId::of(&if_let_some_result::IF_LET_SOME_RESULT),
1489         LintId::of(&indexing_slicing::OUT_OF_BOUNDS_INDEXING),
1490         LintId::of(&infinite_iter::INFINITE_ITER),
1491         LintId::of(&inherent_to_string::INHERENT_TO_STRING),
1492         LintId::of(&inherent_to_string::INHERENT_TO_STRING_SHADOW_DISPLAY),
1493         LintId::of(&inline_fn_without_body::INLINE_FN_WITHOUT_BODY),
1494         LintId::of(&int_plus_one::INT_PLUS_ONE),
1495         LintId::of(&large_const_arrays::LARGE_CONST_ARRAYS),
1496         LintId::of(&large_enum_variant::LARGE_ENUM_VARIANT),
1497         LintId::of(&len_zero::COMPARISON_TO_EMPTY),
1498         LintId::of(&len_zero::LEN_WITHOUT_IS_EMPTY),
1499         LintId::of(&len_zero::LEN_ZERO),
1500         LintId::of(&let_underscore::LET_UNDERSCORE_LOCK),
1501         LintId::of(&lifetimes::EXTRA_UNUSED_LIFETIMES),
1502         LintId::of(&lifetimes::NEEDLESS_LIFETIMES),
1503         LintId::of(&literal_representation::INCONSISTENT_DIGIT_GROUPING),
1504         LintId::of(&literal_representation::MISTYPED_LITERAL_SUFFIXES),
1505         LintId::of(&literal_representation::UNUSUAL_BYTE_GROUPINGS),
1506         LintId::of(&loops::EMPTY_LOOP),
1507         LintId::of(&loops::EXPLICIT_COUNTER_LOOP),
1508         LintId::of(&loops::FOR_KV_MAP),
1509         LintId::of(&loops::FOR_LOOPS_OVER_FALLIBLES),
1510         LintId::of(&loops::ITER_NEXT_LOOP),
1511         LintId::of(&loops::MANUAL_FLATTEN),
1512         LintId::of(&loops::MANUAL_MEMCPY),
1513         LintId::of(&loops::MUT_RANGE_BOUND),
1514         LintId::of(&loops::NEEDLESS_COLLECT),
1515         LintId::of(&loops::NEEDLESS_RANGE_LOOP),
1516         LintId::of(&loops::NEVER_LOOP),
1517         LintId::of(&loops::SAME_ITEM_PUSH),
1518         LintId::of(&loops::SINGLE_ELEMENT_LOOP),
1519         LintId::of(&loops::WHILE_IMMUTABLE_CONDITION),
1520         LintId::of(&loops::WHILE_LET_LOOP),
1521         LintId::of(&loops::WHILE_LET_ON_ITERATOR),
1522         LintId::of(&main_recursion::MAIN_RECURSION),
1523         LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
1524         LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
1525         LintId::of(&manual_strip::MANUAL_STRIP),
1526         LintId::of(&manual_unwrap_or::MANUAL_UNWRAP_OR),
1527         LintId::of(&map_clone::MAP_CLONE),
1528         LintId::of(&map_identity::MAP_IDENTITY),
1529         LintId::of(&map_unit_fn::OPTION_MAP_UNIT_FN),
1530         LintId::of(&map_unit_fn::RESULT_MAP_UNIT_FN),
1531         LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
1532         LintId::of(&matches::MATCH_AS_REF),
1533         LintId::of(&matches::MATCH_LIKE_MATCHES_MACRO),
1534         LintId::of(&matches::MATCH_OVERLAPPING_ARM),
1535         LintId::of(&matches::MATCH_REF_PATS),
1536         LintId::of(&matches::MATCH_SINGLE_BINDING),
1537         LintId::of(&matches::REDUNDANT_PATTERN_MATCHING),
1538         LintId::of(&matches::SINGLE_MATCH),
1539         LintId::of(&matches::WILDCARD_IN_OR_PATTERNS),
1540         LintId::of(&mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
1541         LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
1542         LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
1543         LintId::of(&mem_replace::MEM_REPLACE_WITH_UNINIT),
1544         LintId::of(&methods::BIND_INSTEAD_OF_MAP),
1545         LintId::of(&methods::BYTES_NTH),
1546         LintId::of(&methods::CHARS_LAST_CMP),
1547         LintId::of(&methods::CHARS_NEXT_CMP),
1548         LintId::of(&methods::CLONE_DOUBLE_REF),
1549         LintId::of(&methods::CLONE_ON_COPY),
1550         LintId::of(&methods::EXPECT_FUN_CALL),
1551         LintId::of(&methods::FILTER_MAP_IDENTITY),
1552         LintId::of(&methods::FILTER_NEXT),
1553         LintId::of(&methods::FLAT_MAP_IDENTITY),
1554         LintId::of(&methods::FROM_ITER_INSTEAD_OF_COLLECT),
1555         LintId::of(&methods::INSPECT_FOR_EACH),
1556         LintId::of(&methods::INTO_ITER_ON_REF),
1557         LintId::of(&methods::ITERATOR_STEP_BY_ZERO),
1558         LintId::of(&methods::ITER_CLONED_COLLECT),
1559         LintId::of(&methods::ITER_NEXT_SLICE),
1560         LintId::of(&methods::ITER_NTH),
1561         LintId::of(&methods::ITER_NTH_ZERO),
1562         LintId::of(&methods::ITER_SKIP_NEXT),
1563         LintId::of(&methods::MANUAL_FILTER_MAP),
1564         LintId::of(&methods::MANUAL_FIND_MAP),
1565         LintId::of(&methods::MANUAL_SATURATING_ARITHMETIC),
1566         LintId::of(&methods::MAP_COLLECT_RESULT_UNIT),
1567         LintId::of(&methods::NEW_RET_NO_SELF),
1568         LintId::of(&methods::OK_EXPECT),
1569         LintId::of(&methods::OPTION_AS_REF_DEREF),
1570         LintId::of(&methods::OPTION_MAP_OR_NONE),
1571         LintId::of(&methods::OR_FUN_CALL),
1572         LintId::of(&methods::RESULT_MAP_OR_INTO_OPTION),
1573         LintId::of(&methods::SEARCH_IS_SOME),
1574         LintId::of(&methods::SHOULD_IMPLEMENT_TRAIT),
1575         LintId::of(&methods::SINGLE_CHAR_ADD_STR),
1576         LintId::of(&methods::SINGLE_CHAR_PATTERN),
1577         LintId::of(&methods::SKIP_WHILE_NEXT),
1578         LintId::of(&methods::STRING_EXTEND_CHARS),
1579         LintId::of(&methods::SUSPICIOUS_MAP),
1580         LintId::of(&methods::UNINIT_ASSUMED_INIT),
1581         LintId::of(&methods::UNNECESSARY_FILTER_MAP),
1582         LintId::of(&methods::UNNECESSARY_FOLD),
1583         LintId::of(&methods::UNNECESSARY_LAZY_EVALUATIONS),
1584         LintId::of(&methods::USELESS_ASREF),
1585         LintId::of(&methods::WRONG_SELF_CONVENTION),
1586         LintId::of(&methods::ZST_OFFSET),
1587         LintId::of(&minmax::MIN_MAX),
1588         LintId::of(&misc::CMP_NAN),
1589         LintId::of(&misc::CMP_OWNED),
1590         LintId::of(&misc::FLOAT_CMP),
1591         LintId::of(&misc::MODULO_ONE),
1592         LintId::of(&misc::SHORT_CIRCUIT_STATEMENT),
1593         LintId::of(&misc::TOPLEVEL_REF_ARG),
1594         LintId::of(&misc::ZERO_PTR),
1595         LintId::of(&misc_early::BUILTIN_TYPE_SHADOW),
1596         LintId::of(&misc_early::DOUBLE_NEG),
1597         LintId::of(&misc_early::DUPLICATE_UNDERSCORE_ARGUMENT),
1598         LintId::of(&misc_early::MIXED_CASE_HEX_LITERALS),
1599         LintId::of(&misc_early::REDUNDANT_PATTERN),
1600         LintId::of(&misc_early::UNNEEDED_WILDCARD_PATTERN),
1601         LintId::of(&misc_early::ZERO_PREFIXED_LITERAL),
1602         LintId::of(&mut_key::MUTABLE_KEY_TYPE),
1603         LintId::of(&mut_mutex_lock::MUT_MUTEX_LOCK),
1604         LintId::of(&mut_reference::UNNECESSARY_MUT_PASSED),
1605         LintId::of(&mutex_atomic::MUTEX_ATOMIC),
1606         LintId::of(&needless_arbitrary_self_type::NEEDLESS_ARBITRARY_SELF_TYPE),
1607         LintId::of(&needless_bool::BOOL_COMPARISON),
1608         LintId::of(&needless_bool::NEEDLESS_BOOL),
1609         LintId::of(&needless_borrowed_ref::NEEDLESS_BORROWED_REFERENCE),
1610         LintId::of(&needless_question_mark::NEEDLESS_QUESTION_MARK),
1611         LintId::of(&needless_update::NEEDLESS_UPDATE),
1612         LintId::of(&neg_cmp_op_on_partial_ord::NEG_CMP_OP_ON_PARTIAL_ORD),
1613         LintId::of(&neg_multiply::NEG_MULTIPLY),
1614         LintId::of(&new_without_default::NEW_WITHOUT_DEFAULT),
1615         LintId::of(&no_effect::NO_EFFECT),
1616         LintId::of(&no_effect::UNNECESSARY_OPERATION),
1617         LintId::of(&non_copy_const::BORROW_INTERIOR_MUTABLE_CONST),
1618         LintId::of(&non_copy_const::DECLARE_INTERIOR_MUTABLE_CONST),
1619         LintId::of(&non_expressive_names::JUST_UNDERSCORES_AND_DIGITS),
1620         LintId::of(&non_expressive_names::MANY_SINGLE_CHAR_NAMES),
1621         LintId::of(&open_options::NONSENSICAL_OPEN_OPTIONS),
1622         LintId::of(&option_env_unwrap::OPTION_ENV_UNWRAP),
1623         LintId::of(&overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL),
1624         LintId::of(&partialeq_ne_impl::PARTIALEQ_NE_IMPL),
1625         LintId::of(&precedence::PRECEDENCE),
1626         LintId::of(&ptr::CMP_NULL),
1627         LintId::of(&ptr::MUT_FROM_REF),
1628         LintId::of(&ptr::PTR_ARG),
1629         LintId::of(&ptr_eq::PTR_EQ),
1630         LintId::of(&ptr_offset_with_cast::PTR_OFFSET_WITH_CAST),
1631         LintId::of(&question_mark::QUESTION_MARK),
1632         LintId::of(&ranges::MANUAL_RANGE_CONTAINS),
1633         LintId::of(&ranges::RANGE_ZIP_WITH_LEN),
1634         LintId::of(&ranges::REVERSED_EMPTY_RANGES),
1635         LintId::of(&redundant_clone::REDUNDANT_CLONE),
1636         LintId::of(&redundant_closure_call::REDUNDANT_CLOSURE_CALL),
1637         LintId::of(&redundant_field_names::REDUNDANT_FIELD_NAMES),
1638         LintId::of(&redundant_slicing::REDUNDANT_SLICING),
1639         LintId::of(&redundant_static_lifetimes::REDUNDANT_STATIC_LIFETIMES),
1640         LintId::of(&reference::DEREF_ADDROF),
1641         LintId::of(&reference::REF_IN_DEREF),
1642         LintId::of(&regex::INVALID_REGEX),
1643         LintId::of(&repeat_once::REPEAT_ONCE),
1644         LintId::of(&returns::LET_AND_RETURN),
1645         LintId::of(&returns::NEEDLESS_RETURN),
1646         LintId::of(&self_assignment::SELF_ASSIGNMENT),
1647         LintId::of(&serde_api::SERDE_API_MISUSE),
1648         LintId::of(&single_component_path_imports::SINGLE_COMPONENT_PATH_IMPORTS),
1649         LintId::of(&size_of_in_element_count::SIZE_OF_IN_ELEMENT_COUNT),
1650         LintId::of(&slow_vector_initialization::SLOW_VECTOR_INITIALIZATION),
1651         LintId::of(&stable_sort_primitive::STABLE_SORT_PRIMITIVE),
1652         LintId::of(&strings::STRING_FROM_UTF8_AS_BYTES),
1653         LintId::of(&suspicious_operation_groupings::SUSPICIOUS_OPERATION_GROUPINGS),
1654         LintId::of(&suspicious_trait_impl::SUSPICIOUS_ARITHMETIC_IMPL),
1655         LintId::of(&suspicious_trait_impl::SUSPICIOUS_OP_ASSIGN_IMPL),
1656         LintId::of(&swap::ALMOST_SWAPPED),
1657         LintId::of(&swap::MANUAL_SWAP),
1658         LintId::of(&tabs_in_doc_comments::TABS_IN_DOC_COMMENTS),
1659         LintId::of(&temporary_assignment::TEMPORARY_ASSIGNMENT),
1660         LintId::of(&to_digit_is_some::TO_DIGIT_IS_SOME),
1661         LintId::of(&to_string_in_display::TO_STRING_IN_DISPLAY),
1662         LintId::of(&transmute::CROSSPOINTER_TRANSMUTE),
1663         LintId::of(&transmute::TRANSMUTES_EXPRESSIBLE_AS_PTR_CASTS),
1664         LintId::of(&transmute::TRANSMUTE_BYTES_TO_STR),
1665         LintId::of(&transmute::TRANSMUTE_FLOAT_TO_INT),
1666         LintId::of(&transmute::TRANSMUTE_INT_TO_BOOL),
1667         LintId::of(&transmute::TRANSMUTE_INT_TO_CHAR),
1668         LintId::of(&transmute::TRANSMUTE_INT_TO_FLOAT),
1669         LintId::of(&transmute::TRANSMUTE_PTR_TO_PTR),
1670         LintId::of(&transmute::TRANSMUTE_PTR_TO_REF),
1671         LintId::of(&transmute::UNSOUND_COLLECTION_TRANSMUTE),
1672         LintId::of(&transmute::WRONG_TRANSMUTE),
1673         LintId::of(&transmuting_null::TRANSMUTING_NULL),
1674         LintId::of(&try_err::TRY_ERR),
1675         LintId::of(&types::ABSURD_EXTREME_COMPARISONS),
1676         LintId::of(&types::BORROWED_BOX),
1677         LintId::of(&types::BOX_VEC),
1678         LintId::of(&types::CAST_REF_TO_MUT),
1679         LintId::of(&types::CHAR_LIT_AS_U8),
1680         LintId::of(&types::FN_TO_NUMERIC_CAST),
1681         LintId::of(&types::FN_TO_NUMERIC_CAST_WITH_TRUNCATION),
1682         LintId::of(&types::REDUNDANT_ALLOCATION),
1683         LintId::of(&types::TYPE_COMPLEXITY),
1684         LintId::of(&types::UNIT_ARG),
1685         LintId::of(&types::UNIT_CMP),
1686         LintId::of(&types::UNNECESSARY_CAST),
1687         LintId::of(&types::VEC_BOX),
1688         LintId::of(&undropped_manually_drops::UNDROPPED_MANUALLY_DROPS),
1689         LintId::of(&unicode::INVISIBLE_CHARACTERS),
1690         LintId::of(&unit_return_expecting_ord::UNIT_RETURN_EXPECTING_ORD),
1691         LintId::of(&unnamed_address::FN_ADDRESS_COMPARISONS),
1692         LintId::of(&unnamed_address::VTABLE_ADDRESS_COMPARISONS),
1693         LintId::of(&unnecessary_sort_by::UNNECESSARY_SORT_BY),
1694         LintId::of(&unsafe_removed_from_name::UNSAFE_REMOVED_FROM_NAME),
1695         LintId::of(&unused_io_amount::UNUSED_IO_AMOUNT),
1696         LintId::of(&unused_unit::UNUSED_UNIT),
1697         LintId::of(&unwrap::PANICKING_UNWRAP),
1698         LintId::of(&unwrap::UNNECESSARY_UNWRAP),
1699         LintId::of(&upper_case_acronyms::UPPER_CASE_ACRONYMS),
1700         LintId::of(&useless_conversion::USELESS_CONVERSION),
1701         LintId::of(&vec::USELESS_VEC),
1702         LintId::of(&vec_init_then_push::VEC_INIT_THEN_PUSH),
1703         LintId::of(&vec_resize_to_zero::VEC_RESIZE_TO_ZERO),
1704         LintId::of(&write::PRINTLN_EMPTY_STRING),
1705         LintId::of(&write::PRINT_LITERAL),
1706         LintId::of(&write::PRINT_WITH_NEWLINE),
1707         LintId::of(&write::WRITELN_EMPTY_STRING),
1708         LintId::of(&write::WRITE_LITERAL),
1709         LintId::of(&write::WRITE_WITH_NEWLINE),
1710         LintId::of(&zero_div_zero::ZERO_DIVIDED_BY_ZERO),
1711     ]);
1712
1713     store.register_group(true, "clippy::style", Some("clippy_style"), vec![
1714         LintId::of(&assertions_on_constants::ASSERTIONS_ON_CONSTANTS),
1715         LintId::of(&assign_ops::ASSIGN_OP_PATTERN),
1716         LintId::of(&attrs::BLANKET_CLIPPY_RESTRICTION_LINTS),
1717         LintId::of(&blacklisted_name::BLACKLISTED_NAME),
1718         LintId::of(&blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS),
1719         LintId::of(&collapsible_if::COLLAPSIBLE_ELSE_IF),
1720         LintId::of(&collapsible_if::COLLAPSIBLE_IF),
1721         LintId::of(&collapsible_match::COLLAPSIBLE_MATCH),
1722         LintId::of(&comparison_chain::COMPARISON_CHAIN),
1723         LintId::of(&default::FIELD_REASSIGN_WITH_DEFAULT),
1724         LintId::of(&doc::MISSING_SAFETY_DOC),
1725         LintId::of(&doc::NEEDLESS_DOCTEST_MAIN),
1726         LintId::of(&enum_variants::ENUM_VARIANT_NAMES),
1727         LintId::of(&enum_variants::MODULE_INCEPTION),
1728         LintId::of(&eq_op::OP_REF),
1729         LintId::of(&eta_reduction::REDUNDANT_CLOSURE),
1730         LintId::of(&float_literal::EXCESSIVE_PRECISION),
1731         LintId::of(&formatting::SUSPICIOUS_ASSIGNMENT_FORMATTING),
1732         LintId::of(&formatting::SUSPICIOUS_ELSE_FORMATTING),
1733         LintId::of(&formatting::SUSPICIOUS_UNARY_OP_FORMATTING),
1734         LintId::of(&from_over_into::FROM_OVER_INTO),
1735         LintId::of(&from_str_radix_10::FROM_STR_RADIX_10),
1736         LintId::of(&functions::DOUBLE_MUST_USE),
1737         LintId::of(&functions::MUST_USE_UNIT),
1738         LintId::of(&functions::RESULT_UNIT_ERR),
1739         LintId::of(&if_let_some_result::IF_LET_SOME_RESULT),
1740         LintId::of(&inherent_to_string::INHERENT_TO_STRING),
1741         LintId::of(&len_zero::COMPARISON_TO_EMPTY),
1742         LintId::of(&len_zero::LEN_WITHOUT_IS_EMPTY),
1743         LintId::of(&len_zero::LEN_ZERO),
1744         LintId::of(&literal_representation::INCONSISTENT_DIGIT_GROUPING),
1745         LintId::of(&literal_representation::UNUSUAL_BYTE_GROUPINGS),
1746         LintId::of(&loops::EMPTY_LOOP),
1747         LintId::of(&loops::FOR_KV_MAP),
1748         LintId::of(&loops::NEEDLESS_RANGE_LOOP),
1749         LintId::of(&loops::SAME_ITEM_PUSH),
1750         LintId::of(&loops::WHILE_LET_ON_ITERATOR),
1751         LintId::of(&main_recursion::MAIN_RECURSION),
1752         LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
1753         LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
1754         LintId::of(&map_clone::MAP_CLONE),
1755         LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
1756         LintId::of(&matches::MATCH_LIKE_MATCHES_MACRO),
1757         LintId::of(&matches::MATCH_OVERLAPPING_ARM),
1758         LintId::of(&matches::MATCH_REF_PATS),
1759         LintId::of(&matches::REDUNDANT_PATTERN_MATCHING),
1760         LintId::of(&matches::SINGLE_MATCH),
1761         LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
1762         LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
1763         LintId::of(&methods::BYTES_NTH),
1764         LintId::of(&methods::CHARS_LAST_CMP),
1765         LintId::of(&methods::CHARS_NEXT_CMP),
1766         LintId::of(&methods::FROM_ITER_INSTEAD_OF_COLLECT),
1767         LintId::of(&methods::INTO_ITER_ON_REF),
1768         LintId::of(&methods::ITER_CLONED_COLLECT),
1769         LintId::of(&methods::ITER_NEXT_SLICE),
1770         LintId::of(&methods::ITER_NTH_ZERO),
1771         LintId::of(&methods::ITER_SKIP_NEXT),
1772         LintId::of(&methods::MANUAL_SATURATING_ARITHMETIC),
1773         LintId::of(&methods::MAP_COLLECT_RESULT_UNIT),
1774         LintId::of(&methods::NEW_RET_NO_SELF),
1775         LintId::of(&methods::OK_EXPECT),
1776         LintId::of(&methods::OPTION_MAP_OR_NONE),
1777         LintId::of(&methods::RESULT_MAP_OR_INTO_OPTION),
1778         LintId::of(&methods::SHOULD_IMPLEMENT_TRAIT),
1779         LintId::of(&methods::SINGLE_CHAR_ADD_STR),
1780         LintId::of(&methods::STRING_EXTEND_CHARS),
1781         LintId::of(&methods::UNNECESSARY_FOLD),
1782         LintId::of(&methods::UNNECESSARY_LAZY_EVALUATIONS),
1783         LintId::of(&methods::WRONG_SELF_CONVENTION),
1784         LintId::of(&misc::TOPLEVEL_REF_ARG),
1785         LintId::of(&misc::ZERO_PTR),
1786         LintId::of(&misc_early::BUILTIN_TYPE_SHADOW),
1787         LintId::of(&misc_early::DOUBLE_NEG),
1788         LintId::of(&misc_early::DUPLICATE_UNDERSCORE_ARGUMENT),
1789         LintId::of(&misc_early::MIXED_CASE_HEX_LITERALS),
1790         LintId::of(&misc_early::REDUNDANT_PATTERN),
1791         LintId::of(&mut_mutex_lock::MUT_MUTEX_LOCK),
1792         LintId::of(&mut_reference::UNNECESSARY_MUT_PASSED),
1793         LintId::of(&neg_multiply::NEG_MULTIPLY),
1794         LintId::of(&new_without_default::NEW_WITHOUT_DEFAULT),
1795         LintId::of(&non_copy_const::BORROW_INTERIOR_MUTABLE_CONST),
1796         LintId::of(&non_copy_const::DECLARE_INTERIOR_MUTABLE_CONST),
1797         LintId::of(&non_expressive_names::JUST_UNDERSCORES_AND_DIGITS),
1798         LintId::of(&non_expressive_names::MANY_SINGLE_CHAR_NAMES),
1799         LintId::of(&ptr::CMP_NULL),
1800         LintId::of(&ptr::PTR_ARG),
1801         LintId::of(&ptr_eq::PTR_EQ),
1802         LintId::of(&question_mark::QUESTION_MARK),
1803         LintId::of(&ranges::MANUAL_RANGE_CONTAINS),
1804         LintId::of(&redundant_field_names::REDUNDANT_FIELD_NAMES),
1805         LintId::of(&redundant_static_lifetimes::REDUNDANT_STATIC_LIFETIMES),
1806         LintId::of(&returns::LET_AND_RETURN),
1807         LintId::of(&returns::NEEDLESS_RETURN),
1808         LintId::of(&single_component_path_imports::SINGLE_COMPONENT_PATH_IMPORTS),
1809         LintId::of(&suspicious_operation_groupings::SUSPICIOUS_OPERATION_GROUPINGS),
1810         LintId::of(&tabs_in_doc_comments::TABS_IN_DOC_COMMENTS),
1811         LintId::of(&to_digit_is_some::TO_DIGIT_IS_SOME),
1812         LintId::of(&try_err::TRY_ERR),
1813         LintId::of(&types::FN_TO_NUMERIC_CAST),
1814         LintId::of(&types::FN_TO_NUMERIC_CAST_WITH_TRUNCATION),
1815         LintId::of(&unsafe_removed_from_name::UNSAFE_REMOVED_FROM_NAME),
1816         LintId::of(&unused_unit::UNUSED_UNIT),
1817         LintId::of(&upper_case_acronyms::UPPER_CASE_ACRONYMS),
1818         LintId::of(&write::PRINTLN_EMPTY_STRING),
1819         LintId::of(&write::PRINT_LITERAL),
1820         LintId::of(&write::PRINT_WITH_NEWLINE),
1821         LintId::of(&write::WRITELN_EMPTY_STRING),
1822         LintId::of(&write::WRITE_LITERAL),
1823         LintId::of(&write::WRITE_WITH_NEWLINE),
1824     ]);
1825
1826     store.register_group(true, "clippy::complexity", Some("clippy_complexity"), vec![
1827         LintId::of(&assign_ops::MISREFACTORED_ASSIGN_OP),
1828         LintId::of(&attrs::DEPRECATED_CFG_ATTR),
1829         LintId::of(&booleans::NONMINIMAL_BOOL),
1830         LintId::of(&double_comparison::DOUBLE_COMPARISONS),
1831         LintId::of(&double_parens::DOUBLE_PARENS),
1832         LintId::of(&duration_subsec::DURATION_SUBSEC),
1833         LintId::of(&eval_order_dependence::DIVERGING_SUB_EXPRESSION),
1834         LintId::of(&eval_order_dependence::EVAL_ORDER_DEPENDENCE),
1835         LintId::of(&explicit_write::EXPLICIT_WRITE),
1836         LintId::of(&format::USELESS_FORMAT),
1837         LintId::of(&functions::TOO_MANY_ARGUMENTS),
1838         LintId::of(&get_last_with_len::GET_LAST_WITH_LEN),
1839         LintId::of(&identity_op::IDENTITY_OP),
1840         LintId::of(&int_plus_one::INT_PLUS_ONE),
1841         LintId::of(&lifetimes::EXTRA_UNUSED_LIFETIMES),
1842         LintId::of(&lifetimes::NEEDLESS_LIFETIMES),
1843         LintId::of(&loops::EXPLICIT_COUNTER_LOOP),
1844         LintId::of(&loops::MANUAL_FLATTEN),
1845         LintId::of(&loops::MUT_RANGE_BOUND),
1846         LintId::of(&loops::SINGLE_ELEMENT_LOOP),
1847         LintId::of(&loops::WHILE_LET_LOOP),
1848         LintId::of(&manual_strip::MANUAL_STRIP),
1849         LintId::of(&manual_unwrap_or::MANUAL_UNWRAP_OR),
1850         LintId::of(&map_identity::MAP_IDENTITY),
1851         LintId::of(&map_unit_fn::OPTION_MAP_UNIT_FN),
1852         LintId::of(&map_unit_fn::RESULT_MAP_UNIT_FN),
1853         LintId::of(&matches::MATCH_AS_REF),
1854         LintId::of(&matches::MATCH_SINGLE_BINDING),
1855         LintId::of(&matches::WILDCARD_IN_OR_PATTERNS),
1856         LintId::of(&methods::BIND_INSTEAD_OF_MAP),
1857         LintId::of(&methods::CLONE_ON_COPY),
1858         LintId::of(&methods::FILTER_MAP_IDENTITY),
1859         LintId::of(&methods::FILTER_NEXT),
1860         LintId::of(&methods::FLAT_MAP_IDENTITY),
1861         LintId::of(&methods::INSPECT_FOR_EACH),
1862         LintId::of(&methods::MANUAL_FILTER_MAP),
1863         LintId::of(&methods::MANUAL_FIND_MAP),
1864         LintId::of(&methods::OPTION_AS_REF_DEREF),
1865         LintId::of(&methods::SEARCH_IS_SOME),
1866         LintId::of(&methods::SKIP_WHILE_NEXT),
1867         LintId::of(&methods::SUSPICIOUS_MAP),
1868         LintId::of(&methods::UNNECESSARY_FILTER_MAP),
1869         LintId::of(&methods::USELESS_ASREF),
1870         LintId::of(&misc::SHORT_CIRCUIT_STATEMENT),
1871         LintId::of(&misc_early::UNNEEDED_WILDCARD_PATTERN),
1872         LintId::of(&misc_early::ZERO_PREFIXED_LITERAL),
1873         LintId::of(&needless_arbitrary_self_type::NEEDLESS_ARBITRARY_SELF_TYPE),
1874         LintId::of(&needless_bool::BOOL_COMPARISON),
1875         LintId::of(&needless_bool::NEEDLESS_BOOL),
1876         LintId::of(&needless_borrowed_ref::NEEDLESS_BORROWED_REFERENCE),
1877         LintId::of(&needless_question_mark::NEEDLESS_QUESTION_MARK),
1878         LintId::of(&needless_update::NEEDLESS_UPDATE),
1879         LintId::of(&neg_cmp_op_on_partial_ord::NEG_CMP_OP_ON_PARTIAL_ORD),
1880         LintId::of(&no_effect::NO_EFFECT),
1881         LintId::of(&no_effect::UNNECESSARY_OPERATION),
1882         LintId::of(&overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL),
1883         LintId::of(&partialeq_ne_impl::PARTIALEQ_NE_IMPL),
1884         LintId::of(&precedence::PRECEDENCE),
1885         LintId::of(&ptr_offset_with_cast::PTR_OFFSET_WITH_CAST),
1886         LintId::of(&ranges::RANGE_ZIP_WITH_LEN),
1887         LintId::of(&redundant_closure_call::REDUNDANT_CLOSURE_CALL),
1888         LintId::of(&redundant_slicing::REDUNDANT_SLICING),
1889         LintId::of(&reference::DEREF_ADDROF),
1890         LintId::of(&reference::REF_IN_DEREF),
1891         LintId::of(&repeat_once::REPEAT_ONCE),
1892         LintId::of(&strings::STRING_FROM_UTF8_AS_BYTES),
1893         LintId::of(&swap::MANUAL_SWAP),
1894         LintId::of(&temporary_assignment::TEMPORARY_ASSIGNMENT),
1895         LintId::of(&transmute::CROSSPOINTER_TRANSMUTE),
1896         LintId::of(&transmute::TRANSMUTES_EXPRESSIBLE_AS_PTR_CASTS),
1897         LintId::of(&transmute::TRANSMUTE_BYTES_TO_STR),
1898         LintId::of(&transmute::TRANSMUTE_FLOAT_TO_INT),
1899         LintId::of(&transmute::TRANSMUTE_INT_TO_BOOL),
1900         LintId::of(&transmute::TRANSMUTE_INT_TO_CHAR),
1901         LintId::of(&transmute::TRANSMUTE_INT_TO_FLOAT),
1902         LintId::of(&transmute::TRANSMUTE_PTR_TO_PTR),
1903         LintId::of(&transmute::TRANSMUTE_PTR_TO_REF),
1904         LintId::of(&types::BORROWED_BOX),
1905         LintId::of(&types::CHAR_LIT_AS_U8),
1906         LintId::of(&types::TYPE_COMPLEXITY),
1907         LintId::of(&types::UNIT_ARG),
1908         LintId::of(&types::UNNECESSARY_CAST),
1909         LintId::of(&types::VEC_BOX),
1910         LintId::of(&unnecessary_sort_by::UNNECESSARY_SORT_BY),
1911         LintId::of(&unwrap::UNNECESSARY_UNWRAP),
1912         LintId::of(&useless_conversion::USELESS_CONVERSION),
1913         LintId::of(&zero_div_zero::ZERO_DIVIDED_BY_ZERO),
1914     ]);
1915
1916     store.register_group(true, "clippy::correctness", Some("clippy_correctness"), vec![
1917         LintId::of(&approx_const::APPROX_CONSTANT),
1918         LintId::of(&async_yields_async::ASYNC_YIELDS_ASYNC),
1919         LintId::of(&atomic_ordering::INVALID_ATOMIC_ORDERING),
1920         LintId::of(&attrs::DEPRECATED_SEMVER),
1921         LintId::of(&attrs::MISMATCHED_TARGET_OS),
1922         LintId::of(&attrs::USELESS_ATTRIBUTE),
1923         LintId::of(&bit_mask::BAD_BIT_MASK),
1924         LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
1925         LintId::of(&booleans::LOGIC_BUG),
1926         LintId::of(&copies::IFS_SAME_COND),
1927         LintId::of(&copies::IF_SAME_THEN_ELSE),
1928         LintId::of(&derive::DERIVE_HASH_XOR_EQ),
1929         LintId::of(&derive::DERIVE_ORD_XOR_PARTIAL_ORD),
1930         LintId::of(&drop_forget_ref::DROP_COPY),
1931         LintId::of(&drop_forget_ref::DROP_REF),
1932         LintId::of(&drop_forget_ref::FORGET_COPY),
1933         LintId::of(&drop_forget_ref::FORGET_REF),
1934         LintId::of(&enum_clike::ENUM_CLIKE_UNPORTABLE_VARIANT),
1935         LintId::of(&eq_op::EQ_OP),
1936         LintId::of(&erasing_op::ERASING_OP),
1937         LintId::of(&float_equality_without_abs::FLOAT_EQUALITY_WITHOUT_ABS),
1938         LintId::of(&formatting::POSSIBLE_MISSING_COMMA),
1939         LintId::of(&functions::NOT_UNSAFE_PTR_ARG_DEREF),
1940         LintId::of(&if_let_mutex::IF_LET_MUTEX),
1941         LintId::of(&indexing_slicing::OUT_OF_BOUNDS_INDEXING),
1942         LintId::of(&infinite_iter::INFINITE_ITER),
1943         LintId::of(&inherent_to_string::INHERENT_TO_STRING_SHADOW_DISPLAY),
1944         LintId::of(&inline_fn_without_body::INLINE_FN_WITHOUT_BODY),
1945         LintId::of(&let_underscore::LET_UNDERSCORE_LOCK),
1946         LintId::of(&literal_representation::MISTYPED_LITERAL_SUFFIXES),
1947         LintId::of(&loops::FOR_LOOPS_OVER_FALLIBLES),
1948         LintId::of(&loops::ITER_NEXT_LOOP),
1949         LintId::of(&loops::NEVER_LOOP),
1950         LintId::of(&loops::WHILE_IMMUTABLE_CONDITION),
1951         LintId::of(&mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
1952         LintId::of(&mem_replace::MEM_REPLACE_WITH_UNINIT),
1953         LintId::of(&methods::CLONE_DOUBLE_REF),
1954         LintId::of(&methods::ITERATOR_STEP_BY_ZERO),
1955         LintId::of(&methods::UNINIT_ASSUMED_INIT),
1956         LintId::of(&methods::ZST_OFFSET),
1957         LintId::of(&minmax::MIN_MAX),
1958         LintId::of(&misc::CMP_NAN),
1959         LintId::of(&misc::FLOAT_CMP),
1960         LintId::of(&misc::MODULO_ONE),
1961         LintId::of(&mut_key::MUTABLE_KEY_TYPE),
1962         LintId::of(&open_options::NONSENSICAL_OPEN_OPTIONS),
1963         LintId::of(&option_env_unwrap::OPTION_ENV_UNWRAP),
1964         LintId::of(&ptr::MUT_FROM_REF),
1965         LintId::of(&ranges::REVERSED_EMPTY_RANGES),
1966         LintId::of(&regex::INVALID_REGEX),
1967         LintId::of(&self_assignment::SELF_ASSIGNMENT),
1968         LintId::of(&serde_api::SERDE_API_MISUSE),
1969         LintId::of(&size_of_in_element_count::SIZE_OF_IN_ELEMENT_COUNT),
1970         LintId::of(&suspicious_trait_impl::SUSPICIOUS_ARITHMETIC_IMPL),
1971         LintId::of(&suspicious_trait_impl::SUSPICIOUS_OP_ASSIGN_IMPL),
1972         LintId::of(&swap::ALMOST_SWAPPED),
1973         LintId::of(&to_string_in_display::TO_STRING_IN_DISPLAY),
1974         LintId::of(&transmute::UNSOUND_COLLECTION_TRANSMUTE),
1975         LintId::of(&transmute::WRONG_TRANSMUTE),
1976         LintId::of(&transmuting_null::TRANSMUTING_NULL),
1977         LintId::of(&types::ABSURD_EXTREME_COMPARISONS),
1978         LintId::of(&types::CAST_REF_TO_MUT),
1979         LintId::of(&types::UNIT_CMP),
1980         LintId::of(&undropped_manually_drops::UNDROPPED_MANUALLY_DROPS),
1981         LintId::of(&unicode::INVISIBLE_CHARACTERS),
1982         LintId::of(&unit_return_expecting_ord::UNIT_RETURN_EXPECTING_ORD),
1983         LintId::of(&unnamed_address::FN_ADDRESS_COMPARISONS),
1984         LintId::of(&unnamed_address::VTABLE_ADDRESS_COMPARISONS),
1985         LintId::of(&unused_io_amount::UNUSED_IO_AMOUNT),
1986         LintId::of(&unwrap::PANICKING_UNWRAP),
1987         LintId::of(&vec_resize_to_zero::VEC_RESIZE_TO_ZERO),
1988     ]);
1989
1990     store.register_group(true, "clippy::perf", Some("clippy_perf"), vec![
1991         LintId::of(&bytecount::NAIVE_BYTECOUNT),
1992         LintId::of(&entry::MAP_ENTRY),
1993         LintId::of(&escape::BOXED_LOCAL),
1994         LintId::of(&large_const_arrays::LARGE_CONST_ARRAYS),
1995         LintId::of(&large_enum_variant::LARGE_ENUM_VARIANT),
1996         LintId::of(&loops::MANUAL_MEMCPY),
1997         LintId::of(&loops::NEEDLESS_COLLECT),
1998         LintId::of(&methods::EXPECT_FUN_CALL),
1999         LintId::of(&methods::ITER_NTH),
2000         LintId::of(&methods::OR_FUN_CALL),
2001         LintId::of(&methods::SINGLE_CHAR_PATTERN),
2002         LintId::of(&misc::CMP_OWNED),
2003         LintId::of(&mutex_atomic::MUTEX_ATOMIC),
2004         LintId::of(&redundant_clone::REDUNDANT_CLONE),
2005         LintId::of(&slow_vector_initialization::SLOW_VECTOR_INITIALIZATION),
2006         LintId::of(&stable_sort_primitive::STABLE_SORT_PRIMITIVE),
2007         LintId::of(&types::BOX_VEC),
2008         LintId::of(&types::REDUNDANT_ALLOCATION),
2009         LintId::of(&vec::USELESS_VEC),
2010         LintId::of(&vec_init_then_push::VEC_INIT_THEN_PUSH),
2011     ]);
2012
2013     store.register_group(true, "clippy::cargo", Some("clippy_cargo"), vec![
2014         LintId::of(&cargo_common_metadata::CARGO_COMMON_METADATA),
2015         LintId::of(&multiple_crate_versions::MULTIPLE_CRATE_VERSIONS),
2016         LintId::of(&wildcard_dependencies::WILDCARD_DEPENDENCIES),
2017     ]);
2018
2019     store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
2020         LintId::of(&attrs::EMPTY_LINE_AFTER_OUTER_ATTR),
2021         LintId::of(&cognitive_complexity::COGNITIVE_COMPLEXITY),
2022         LintId::of(&disallowed_method::DISALLOWED_METHOD),
2023         LintId::of(&fallible_impl_from::FALLIBLE_IMPL_FROM),
2024         LintId::of(&floating_point_arithmetic::IMPRECISE_FLOPS),
2025         LintId::of(&floating_point_arithmetic::SUBOPTIMAL_FLOPS),
2026         LintId::of(&future_not_send::FUTURE_NOT_SEND),
2027         LintId::of(&let_if_seq::USELESS_LET_IF_SEQ),
2028         LintId::of(&missing_const_for_fn::MISSING_CONST_FOR_FN),
2029         LintId::of(&mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL),
2030         LintId::of(&mutex_atomic::MUTEX_INTEGER),
2031         LintId::of(&needless_borrow::NEEDLESS_BORROW),
2032         LintId::of(&path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE),
2033         LintId::of(&redundant_pub_crate::REDUNDANT_PUB_CRATE),
2034         LintId::of(&regex::TRIVIAL_REGEX),
2035         LintId::of(&strings::STRING_LIT_AS_BYTES),
2036         LintId::of(&transmute::USELESS_TRANSMUTE),
2037         LintId::of(&use_self::USE_SELF),
2038     ]);
2039 }
2040
2041 #[rustfmt::skip]
2042 fn register_removed_non_tool_lints(store: &mut rustc_lint::LintStore) {
2043     store.register_removed(
2044         "should_assert_eq",
2045         "`assert!()` will be more flexible with RFC 2011",
2046     );
2047     store.register_removed(
2048         "extend_from_slice",
2049         "`.extend_from_slice(_)` is a faster way to extend a Vec by a slice",
2050     );
2051     store.register_removed(
2052         "range_step_by_zero",
2053         "`iterator.step_by(0)` panics nowadays",
2054     );
2055     store.register_removed(
2056         "unstable_as_slice",
2057         "`Vec::as_slice` has been stabilized in 1.7",
2058     );
2059     store.register_removed(
2060         "unstable_as_mut_slice",
2061         "`Vec::as_mut_slice` has been stabilized in 1.7",
2062     );
2063     store.register_removed(
2064         "misaligned_transmute",
2065         "this lint has been split into cast_ptr_alignment and transmute_ptr_to_ptr",
2066     );
2067     store.register_removed(
2068         "assign_ops",
2069         "using compound assignment operators (e.g., `+=`) is harmless",
2070     );
2071     store.register_removed(
2072         "if_let_redundant_pattern_matching",
2073         "this lint has been changed to redundant_pattern_matching",
2074     );
2075     store.register_removed(
2076         "unsafe_vector_initialization",
2077         "the replacement suggested by this lint had substantially different behavior",
2078     );
2079     store.register_removed(
2080         "reverse_range_loop",
2081         "this lint is now included in reversed_empty_ranges",
2082     );
2083 }
2084
2085 /// Register renamed lints.
2086 ///
2087 /// Used in `./src/driver.rs`.
2088 pub fn register_renamed(ls: &mut rustc_lint::LintStore) {
2089     ls.register_renamed("clippy::stutter", "clippy::module_name_repetitions");
2090     ls.register_renamed("clippy::new_without_default_derive", "clippy::new_without_default");
2091     ls.register_renamed("clippy::cyclomatic_complexity", "clippy::cognitive_complexity");
2092     ls.register_renamed("clippy::const_static_lifetime", "clippy::redundant_static_lifetimes");
2093     ls.register_renamed("clippy::option_and_then_some", "clippy::bind_instead_of_map");
2094     ls.register_renamed("clippy::block_in_if_condition_expr", "clippy::blocks_in_if_conditions");
2095     ls.register_renamed("clippy::block_in_if_condition_stmt", "clippy::blocks_in_if_conditions");
2096     ls.register_renamed("clippy::option_map_unwrap_or", "clippy::map_unwrap_or");
2097     ls.register_renamed("clippy::option_map_unwrap_or_else", "clippy::map_unwrap_or");
2098     ls.register_renamed("clippy::result_map_unwrap_or_else", "clippy::map_unwrap_or");
2099     ls.register_renamed("clippy::option_unwrap_used", "clippy::unwrap_used");
2100     ls.register_renamed("clippy::result_unwrap_used", "clippy::unwrap_used");
2101     ls.register_renamed("clippy::option_expect_used", "clippy::expect_used");
2102     ls.register_renamed("clippy::result_expect_used", "clippy::expect_used");
2103     ls.register_renamed("clippy::for_loop_over_option", "clippy::for_loops_over_fallibles");
2104     ls.register_renamed("clippy::for_loop_over_result", "clippy::for_loops_over_fallibles");
2105     ls.register_renamed("clippy::identity_conversion", "clippy::useless_conversion");
2106     ls.register_renamed("clippy::zero_width_space", "clippy::invisible_characters");
2107     ls.register_renamed("clippy::single_char_push_str", "clippy::single_char_add_str");
2108 }
2109
2110 // only exists to let the dogfood integration test works.
2111 // Don't run clippy as an executable directly
2112 #[allow(dead_code)]
2113 fn main() {
2114     panic!("Please use the cargo-clippy executable");
2115 }