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