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