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