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