1 //! This file is managed by `cargo dev update_lints`. Do not edit.
3 use lazy_static::lazy_static;
8 pub use lint::LINT_LEVELS;
11 // begin lint list, do not remove this comment, it’s used in `update_lints`
12 pub static ref ALL_LINTS: Vec<Lint> = vec![
14 name: "absurd_extreme_comparisons",
16 desc: "a comparison with a maximum or minimum value that is always true or false",
21 name: "almost_swapped",
23 desc: "`foo = bar; bar = foo` sequence",
28 name: "approx_constant",
30 desc: "the approximate of a known float constant (in `std::fXX::consts`)",
32 module: "approx_const",
35 name: "as_conversions",
37 desc: "using a potentially dangerous silent `as` conversion",
39 module: "as_conversions",
42 name: "assertions_on_constants",
44 desc: "`assert!(true)` / `assert!(false)` will be optimized out by the compiler, and should probably be replaced by a `panic!()` or `unreachable!()`",
46 module: "assertions_on_constants",
49 name: "assign_op_pattern",
51 desc: "assigning the result of an operation on a variable to that same variable",
56 name: "await_holding_lock",
58 desc: "Inside an async function, holding a MutexGuard while calling await",
60 module: "await_holding_lock",
65 desc: "expressions of the form `_ & mask == select` that will only ever return `true` or `false`",
70 name: "bind_instead_of_map",
72 desc: "using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`",
77 name: "blacklisted_name",
79 desc: "usage of a blacklisted/placeholder name",
81 module: "blacklisted_name",
84 name: "blanket_clippy_restriction_lints",
86 desc: "enabling the complete restriction group",
91 name: "blocks_in_if_conditions",
93 desc: "useless or complex blocks that can be eliminated in conditions",
95 module: "blocks_in_if_conditions",
98 name: "bool_comparison",
100 desc: "comparing a variable to a boolean, e.g., `if x == true` or `if x != true`",
102 module: "needless_bool",
105 name: "borrow_interior_mutable_const",
106 group: "correctness",
107 desc: "referencing `const` with interior mutability",
109 module: "non_copy_const",
112 name: "borrowed_box",
114 desc: "a borrow of a boxed type",
121 desc: "usage of `Box<Vec<T>>`, vector elements are already on the heap",
128 desc: "using `Box<T>` where unnecessary",
133 name: "builtin_type_shadow",
135 desc: "shadowing a builtin type",
137 module: "misc_early",
140 name: "cargo_common_metadata",
142 desc: "common metadata is defined in `Cargo.toml`",
144 module: "cargo_common_metadata",
147 name: "cast_lossless",
149 desc: "casts using `as` that are known to be lossless, e.g., `x as u64` where `x: u8`",
154 name: "cast_possible_truncation",
156 desc: "casts that may cause truncation of the value, e.g., `x as u8` where `x: u32`, or `x as i32` where `x: f32`",
161 name: "cast_possible_wrap",
163 desc: "casts that may cause wrapping around the value, e.g., `x as i32` where `x: u32` and `x > i32::MAX`",
168 name: "cast_precision_loss",
170 desc: "casts that cause loss of precision, e.g., `x as f32` where `x: u64`",
175 name: "cast_ptr_alignment",
177 desc: "cast from a pointer to a more-strictly-aligned pointer",
182 name: "cast_ref_to_mut",
183 group: "correctness",
184 desc: "a cast of reference to a mutable pointer",
189 name: "cast_sign_loss",
191 desc: "casts from signed types to unsigned types, e.g., `x as u32` where `x: i32`",
196 name: "char_lit_as_u8",
198 desc: "casting a character literal to `u8` truncates",
203 name: "chars_last_cmp",
205 desc: "using `.chars().last()` or `.chars().next_back()` to check if a string ends with a char",
210 name: "chars_next_cmp",
212 desc: "using `.chars().next()` to check if a string starts with a char",
217 name: "checked_conversions",
219 desc: "`try_from` could replace manual bounds checking when casting",
221 module: "checked_conversions",
224 name: "clone_double_ref",
225 group: "correctness",
226 desc: "using `clone` on `&&T`",
231 name: "clone_on_copy",
233 desc: "using `clone` on a `Copy` type",
238 name: "clone_on_ref_ptr",
239 group: "restriction",
240 desc: "using \'clone\' on a ref-counted pointer",
246 group: "correctness",
247 desc: "comparisons to `NAN`, which will always return false, probably not intended",
254 desc: "comparing a pointer to a null pointer, suggesting to use `.is_null()` instead.",
261 desc: "creating owned instances for comparing with others, e.g., `x == \"foo\".to_string()`",
266 name: "cognitive_complexity",
268 desc: "functions that should be split up into multiple functions",
270 module: "cognitive_complexity",
273 name: "collapsible_if",
275 desc: "`if`s that can be collapsed (e.g., `if x { if y { ... } }` and `else { if x { ... } }`)",
277 module: "collapsible_if",
280 name: "comparison_chain",
282 desc: "`if`s that can be rewritten with `match` and `cmp`",
284 module: "comparison_chain",
287 name: "copy_iterator",
289 desc: "implementing `Iterator` on a `Copy` type",
291 module: "copy_iterator",
294 name: "crosspointer_transmute",
296 desc: "transmutes that have to or from types that are a pointer to the other",
302 group: "restriction",
303 desc: "`dbg!` macro is intended as a debugging tool",
308 name: "debug_assert_with_mut_call",
310 desc: "mutable arguments in `debug_assert{,_ne,_eq}!`",
312 module: "mutable_debug_assertion",
315 name: "decimal_literal_representation",
316 group: "restriction",
317 desc: "using decimal representation when hexadecimal would be better",
319 module: "literal_representation",
322 name: "declare_interior_mutable_const",
323 group: "correctness",
324 desc: "declaring `const` with interior mutability",
326 module: "non_copy_const",
329 name: "default_trait_access",
331 desc: "checks for literal calls to `Default::default()`",
333 module: "default_trait_access",
336 name: "deprecated_cfg_attr",
338 desc: "usage of `cfg_attr(rustfmt)` instead of tool attributes",
343 name: "deprecated_semver",
344 group: "correctness",
345 desc: "use of `#[deprecated(since = \"x\")]` where x is not semver",
350 name: "deref_addrof",
352 desc: "use of `*&` or `*&mut` in an expression",
357 name: "derive_hash_xor_eq",
358 group: "correctness",
359 desc: "deriving `Hash` but implementing `PartialEq` explicitly",
364 name: "derive_ord_xor_partial_ord",
365 group: "correctness",
366 desc: "default lint description",
371 name: "diverging_sub_expression",
373 desc: "whether an expression contains a diverging sub expression",
375 module: "eval_order_dependence",
378 name: "doc_markdown",
380 desc: "presence of `_`, `::` or camel-case outside backticks in documentation",
385 name: "double_comparisons",
387 desc: "unnecessary double comparisons that can be simplified",
389 module: "double_comparison",
392 name: "double_must_use",
394 desc: "`#[must_use]` attribute on a `#[must_use]`-returning function / method",
401 desc: "`--x`, which is a double negation of `x` and not a pre-decrement as in C/C++",
403 module: "misc_early",
406 name: "double_parens",
408 desc: "Warn on unnecessary double parentheses",
410 module: "double_parens",
414 group: "correctness",
415 desc: "Bounds of the form `T: Drop` are useless",
417 module: "drop_bounds",
421 group: "correctness",
422 desc: "calls to `std::mem::drop` with a value that implements Copy",
424 module: "drop_forget_ref",
428 group: "correctness",
429 desc: "calls to `std::mem::drop` with a reference instead of an owned value",
431 module: "drop_forget_ref",
434 name: "duplicate_underscore_argument",
436 desc: "function arguments having names which only differ by an underscore",
438 module: "misc_early",
441 name: "duration_subsec",
443 desc: "checks for calculation of subsecond microseconds or milliseconds",
445 module: "duration_subsec",
448 name: "else_if_without_else",
449 group: "restriction",
450 desc: "`if` expression with an `else if`, but without a final `else` branch",
452 module: "else_if_without_else",
457 desc: "enum with no variants",
459 module: "empty_enum",
462 name: "empty_line_after_outer_attr",
464 desc: "empty line after outer attribute",
471 desc: "empty `loop {}`, which should block or sleep",
476 name: "enum_clike_unportable_variant",
477 group: "correctness",
478 desc: "C-like enums that are `repr(isize/usize)` and have values that don\'t fit into an `i32`",
480 module: "enum_clike",
483 name: "enum_glob_use",
485 desc: "use items that import all variants of an enum",
487 module: "wildcard_imports",
490 name: "enum_variant_names",
492 desc: "enums where all variants share a prefix/postfix",
494 module: "enum_variants",
498 group: "correctness",
499 desc: "equal operands on both sides of a comparison or bitwise combination (e.g., `x == x`)",
505 group: "correctness",
506 desc: "using erasing operations, e.g., `x * 0` or `y & 0`",
508 module: "erasing_op",
511 name: "eval_order_dependence",
513 desc: "whether a variable read occurs before a write depends on sub-expression evaluation order",
515 module: "eval_order_dependence",
518 name: "excessive_precision",
520 desc: "excessive precision for float literal",
522 module: "float_literal",
526 group: "restriction",
527 desc: "`std::process::exit` is called, terminating the program",
532 name: "expect_fun_call",
534 desc: "using any `expect` method with a function call",
540 group: "restriction",
541 desc: "using `.expect()` on `Result` or `Option`, which might be better handled",
546 name: "expl_impl_clone_on_copy",
548 desc: "implementing `Clone` explicitly on `Copy` types",
553 name: "explicit_counter_loop",
555 desc: "for-looping with an explicit counter when `_.enumerate()` would do",
560 name: "explicit_deref_methods",
562 desc: "Explicit use of deref or deref_mut method while not in a method chain.",
564 module: "dereference",
567 name: "explicit_into_iter_loop",
569 desc: "for-looping over `_.into_iter()` when `_` would do",
574 name: "explicit_iter_loop",
576 desc: "for-looping over `_.iter()` or `_.iter_mut()` when `&_` or `&mut _` would do",
581 name: "explicit_write",
583 desc: "using the `write!()` family of functions instead of the `print!()` family of functions, when using the latter would work",
585 module: "explicit_write",
588 name: "extra_unused_lifetimes",
590 desc: "unused lifetimes in function definitions",
595 name: "fallible_impl_from",
597 desc: "Warn on impls of `From<..>` that contain `panic!()` or `unwrap()`",
599 module: "fallible_impl_from",
602 name: "filetype_is_file",
603 group: "restriction",
604 desc: "`FileType::is_file` is not recommended to test for readable file type",
611 desc: "using combinations of `filter`, `map`, `filter_map` and `flat_map` which can usually be written as a single method call",
616 name: "filter_map_next",
618 desc: "using combination of `filter_map` and `next` which can usually be written as a single method call",
625 desc: "using `filter(p).next()`, which is more succinctly expressed as `.find(p)`",
632 desc: "using a combination of `find` and `map` can usually be written as a single method call",
637 name: "flat_map_identity",
639 desc: "call to `flat_map` where `flatten` is sufficient",
644 name: "float_arithmetic",
645 group: "restriction",
646 desc: "any floating-point arithmetic statement",
648 module: "arithmetic",
652 group: "correctness",
653 desc: "using `==` or `!=` on float values instead of comparing difference with an epsilon",
658 name: "float_cmp_const",
659 group: "restriction",
660 desc: "using `==` or `!=` on float constants instead of comparing difference with an epsilon",
665 name: "fn_address_comparisons",
666 group: "correctness",
667 desc: "comparison with an address of a function item",
669 module: "unnamed_address",
672 name: "fn_params_excessive_bools",
674 desc: "using too many bools in function parameters",
676 module: "excessive_bools",
679 name: "fn_to_numeric_cast",
681 desc: "casting a function pointer to a numeric type other than usize",
686 name: "fn_to_numeric_cast_with_truncation",
688 desc: "casting a function pointer to a numeric type not wide enough to store the address",
695 desc: "looping on a map using `iter` when `keys` or `values` would do",
700 name: "for_loops_over_fallibles",
701 group: "correctness",
702 desc: "for-looping over an `Option` or a `Result`, which is more clearly expressed as an `if let`",
708 group: "correctness",
709 desc: "calls to `std::mem::forget` with a value that implements Copy",
711 module: "drop_forget_ref",
715 group: "correctness",
716 desc: "calls to `std::mem::forget` with a reference instead of an owned value",
718 module: "drop_forget_ref",
721 name: "future_not_send",
723 desc: "public Futures must be Send",
725 module: "future_not_send",
728 name: "get_last_with_len",
730 desc: "Using `x.get(x.len() - 1)` when `x.last()` is correct and simpler",
732 module: "get_last_with_len",
736 group: "restriction",
737 desc: "using `.get().unwrap()` or `.get_mut().unwrap()` when using `[]` would work instead",
744 desc: "using identity operations, e.g., `x + 0` or `y / 1`",
746 module: "identity_op",
749 name: "if_let_mutex",
750 group: "correctness",
751 desc: "locking a `Mutex` in an `if let` block can cause deadlocks",
753 module: "if_let_mutex",
756 name: "if_let_some_result",
758 desc: "usage of `ok()` in `if let Some(pat)` statements is unnecessary, match on `Ok(pat)` instead",
760 module: "if_let_some_result",
765 desc: "`if` branches that could be swapped so no negation operation is necessary on the condition",
767 module: "if_not_else",
770 name: "if_same_then_else",
771 group: "correctness",
772 desc: "`if` with the same `then` and `else` blocks",
777 name: "ifs_same_cond",
778 group: "correctness",
779 desc: "consecutive `if`s with the same condition",
784 name: "implicit_hasher",
786 desc: "missing generalization over different hashers",
791 name: "implicit_return",
792 group: "restriction",
793 desc: "use a return statement like `return expr` instead of an expression",
795 module: "implicit_return",
798 name: "implicit_saturating_sub",
800 desc: "Perform saturating subtraction instead of implicitly checking lower bound of data type",
802 module: "implicit_saturating_sub",
805 name: "imprecise_flops",
807 desc: "usage of imprecise floating point operations",
809 module: "floating_point_arithmetic",
812 name: "inconsistent_digit_grouping",
814 desc: "integer literals with digits grouped inconsistently",
816 module: "literal_representation",
819 name: "indexing_slicing",
820 group: "restriction",
821 desc: "indexing/slicing usage",
823 module: "indexing_slicing",
826 name: "ineffective_bit_mask",
827 group: "correctness",
828 desc: "expressions where a bit mask will be rendered useless by a comparison, e.g., `(x | 1) > 2`",
833 name: "inefficient_to_string",
835 desc: "using `to_string` on `&&T` where `T: ToString`",
840 name: "infallible_destructuring_match",
842 desc: "a `match` statement with a single infallible arm instead of a `let`",
847 name: "infinite_iter",
848 group: "correctness",
849 desc: "infinite iteration",
851 module: "infinite_iter",
854 name: "inherent_to_string",
856 desc: "type implements inherent method `to_string()`, but should instead implement the `Display` trait",
858 module: "inherent_to_string",
861 name: "inherent_to_string_shadow_display",
862 group: "correctness",
863 desc: "type implements inherent method `to_string()`, which gets shadowed by the implementation of the `Display` trait",
865 module: "inherent_to_string",
868 name: "inline_always",
870 desc: "use of `#[inline(always)]`",
875 name: "inline_fn_without_body",
876 group: "correctness",
877 desc: "use of `#[inline]` on trait methods without bodies",
879 module: "inline_fn_without_body",
882 name: "int_plus_one",
884 desc: "instead of using `x >= y + 1`, use `x > y`",
886 module: "int_plus_one",
889 name: "integer_arithmetic",
890 group: "restriction",
891 desc: "any integer arithmetic expression which could overflow or panic",
893 module: "arithmetic",
896 name: "integer_division",
897 group: "restriction",
898 desc: "integer division may cause loss of precision",
900 module: "integer_division",
903 name: "into_iter_on_ref",
905 desc: "using `.into_iter()` on a reference",
910 name: "invalid_atomic_ordering",
911 group: "correctness",
912 desc: "usage of invalid atomic ordering in atomic loads/stores and memory fences",
914 module: "atomic_ordering",
917 name: "invalid_regex",
918 group: "correctness",
919 desc: "invalid regular expressions",
924 name: "invalid_upcast_comparisons",
926 desc: "a comparison involving an upcast which is always true or false",
931 name: "items_after_statements",
933 desc: "blocks where an item comes after a statement",
935 module: "items_after_statements",
938 name: "iter_cloned_collect",
940 desc: "using `.cloned().collect()` on slice to create a `Vec`",
945 name: "iter_next_loop",
946 group: "correctness",
947 desc: "for-looping over `_.next()` which is probably not intended",
952 name: "iter_next_slice",
954 desc: "using `.iter().next()` on a sliced array, which can be shortened to just `.get()`",
961 desc: "using `.iter().nth()` on a standard library type with O(1) element access",
966 name: "iter_nth_zero",
968 desc: "replace `iter.nth(0)` with `iter.next()`",
973 name: "iter_skip_next",
975 desc: "using `.skip(x).next()` on an iterator",
980 name: "iterator_step_by_zero",
981 group: "correctness",
982 desc: "using `Iterator::step_by(0)`, which will panic at runtime",
987 name: "just_underscores_and_digits",
989 desc: "unclear name",
991 module: "non_expressive_names",
994 name: "large_const_arrays",
996 desc: "large non-scalar const array may cause performance overhead",
998 module: "large_const_arrays",
1001 name: "large_digit_groups",
1003 desc: "grouping digits into groups that are too large",
1005 module: "literal_representation",
1008 name: "large_enum_variant",
1010 desc: "large size difference between variants on an enum",
1012 module: "large_enum_variant",
1015 name: "large_stack_arrays",
1017 desc: "allocating large arrays on stack may cause stack overflow",
1019 module: "large_stack_arrays",
1022 name: "len_without_is_empty",
1024 desc: "traits or impls with a public `len` method but no corresponding `is_empty` method",
1031 desc: "checking `.len() == 0` or `.len() > 0` (or similar) when `.is_empty()` could be used instead",
1036 name: "let_and_return",
1038 desc: "creating a let-binding and then immediately returning it like `let x = expr; x` at the end of a block",
1040 module: "let_and_return",
1043 name: "let_underscore_lock",
1044 group: "correctness",
1045 desc: "non-binding let on a synchronization lock",
1047 module: "let_underscore",
1050 name: "let_underscore_must_use",
1051 group: "restriction",
1052 desc: "non-binding let on a `#[must_use]` expression",
1054 module: "let_underscore",
1057 name: "let_unit_value",
1059 desc: "creating a `let` binding to a value of unit type, which usually can\'t be used afterwards",
1066 desc: "usage of LinkedList, usually a vector is faster, or a more specialized data structure like a `VecDeque`",
1072 group: "correctness",
1073 desc: "boolean expressions that contain terminals which can be eliminated",
1078 name: "lossy_float_literal",
1079 group: "restriction",
1080 desc: "lossy whole number float literals",
1082 module: "float_literal",
1085 name: "macro_use_imports",
1087 desc: "#[macro_use] is no longer needed",
1089 module: "macro_use",
1092 name: "main_recursion",
1094 desc: "recursion using the entrypoint",
1096 module: "main_recursion",
1099 name: "manual_async_fn",
1101 desc: "manual implementations of `async` functions can be simplified using the dedicated syntax",
1103 module: "manual_async_fn",
1106 name: "manual_memcpy",
1108 desc: "manually copying items between slices",
1113 name: "manual_non_exhaustive",
1115 desc: "manual implementations of the non-exhaustive pattern can be simplified using #[non_exhaustive]",
1117 module: "manual_non_exhaustive",
1120 name: "manual_saturating_arithmetic",
1122 desc: "`.chcked_add/sub(x).unwrap_or(MAX/MIN)`",
1127 name: "manual_swap",
1128 group: "complexity",
1129 desc: "manual swap of two variables",
1134 name: "many_single_char_names",
1136 desc: "too many single character bindings",
1138 module: "non_expressive_names",
1143 desc: "using `iterator.map(|x| x.clone())`, or dereferencing closures for `Copy` types",
1145 module: "map_clone",
1150 desc: "use of `contains_key` followed by `insert` on a `HashMap` or `BTreeMap`",
1155 name: "map_flatten",
1157 desc: "using combinations of `flatten` and `map` which can usually be written as a single method call",
1162 name: "map_identity",
1163 group: "complexity",
1164 desc: "using iterator.map(|x| x)",
1166 module: "map_identity",
1169 name: "map_unwrap_or",
1171 desc: "using `.map(f).unwrap_or(a)` or `.map(f).unwrap_or_else(func)`, which are more succinctly expressed as `map_or(a, f)` or `map_or_else(a, f)`",
1176 name: "match_as_ref",
1177 group: "complexity",
1178 desc: "a `match` on an Option value instead of using `as_ref()` or `as_mut`",
1185 desc: "a `match` on a boolean expression instead of an `if..else` block",
1190 name: "match_like_matches_macro",
1192 desc: "a match that could be written with the matches! macro",
1197 name: "match_on_vec_items",
1199 desc: "matching on vector elements can panic",
1201 module: "match_on_vec_items",
1204 name: "match_overlapping_arm",
1206 desc: "a `match` with overlapping arms",
1211 name: "match_ref_pats",
1213 desc: "a `match` or `if let` with all arms prefixed with `&` instead of deref-ing the match expression",
1218 name: "match_same_arms",
1220 desc: "`match` with identical arm bodies",
1225 name: "match_single_binding",
1226 group: "complexity",
1227 desc: "a match with a single binding instead of using `let` statement",
1232 name: "match_wild_err_arm",
1234 desc: "a `match` with `Err(_)` arm and take drastic actions",
1239 name: "match_wildcard_for_single_variants",
1241 desc: "a wildcard enum match for a single variant",
1246 name: "maybe_infinite_iter",
1248 desc: "possible infinite iteration",
1250 module: "infinite_iter",
1253 name: "mem_discriminant_non_enum",
1254 group: "correctness",
1255 desc: "calling `mem::descriminant` on non-enum type",
1257 module: "mem_discriminant",
1261 group: "restriction",
1262 desc: "`mem::forget` usage on `Drop` types, likely to cause memory leaks",
1264 module: "mem_forget",
1267 name: "mem_replace_option_with_none",
1269 desc: "replacing an `Option` with `None` instead of `take()`",
1271 module: "mem_replace",
1274 name: "mem_replace_with_default",
1276 desc: "replacing a value of type `T` with `T::default()` instead of using `std::mem::take`",
1278 module: "mem_replace",
1281 name: "mem_replace_with_uninit",
1282 group: "correctness",
1283 desc: "`mem::replace(&mut _, mem::uninitialized())` or `mem::replace(&mut _, mem::zeroed())`",
1285 module: "mem_replace",
1289 group: "correctness",
1290 desc: "`min(_, max(_, _))` (or vice versa) with bounds clamping the result to a constant",
1295 name: "mismatched_target_os",
1296 group: "correctness",
1297 desc: "usage of `cfg(operating_system)` instead of `cfg(target_os = \"operating_system\")`",
1302 name: "misrefactored_assign_op",
1303 group: "complexity",
1304 desc: "having a variable on both sides of an assign op",
1306 module: "assign_ops",
1309 name: "missing_const_for_fn",
1311 desc: "Lint functions definitions that could be made `const fn`",
1313 module: "missing_const_for_fn",
1316 name: "missing_docs_in_private_items",
1317 group: "restriction",
1318 desc: "detects missing documentation for public and private members",
1320 module: "missing_doc",
1323 name: "missing_errors_doc",
1325 desc: "`pub fn` returns `Result` without `# Errors` in doc comment",
1330 name: "missing_inline_in_public_items",
1331 group: "restriction",
1332 desc: "detects missing `#[inline]` attribute for public callables (functions, trait methods, methods...)",
1334 module: "missing_inline",
1337 name: "missing_safety_doc",
1339 desc: "`pub unsafe fn` without `# Safety` docs",
1344 name: "mistyped_literal_suffixes",
1345 group: "correctness",
1346 desc: "mistyped literal suffix",
1348 module: "literal_representation",
1351 name: "mixed_case_hex_literals",
1353 desc: "hex literals whose letter digits are not consistently upper- or lowercased",
1355 module: "misc_early",
1358 name: "module_inception",
1360 desc: "modules that have the same name as their parent module",
1362 module: "enum_variants",
1365 name: "module_name_repetitions",
1367 desc: "type names prefixed/postfixed with their containing module\'s name",
1369 module: "enum_variants",
1372 name: "modulo_arithmetic",
1373 group: "restriction",
1374 desc: "any modulo arithmetic statement",
1376 module: "modulo_arithmetic",
1380 group: "correctness",
1381 desc: "taking a number modulo 1, which always returns 0",
1386 name: "multiple_crate_versions",
1388 desc: "multiple versions of the same crate being used",
1390 module: "multiple_crate_versions",
1393 name: "multiple_inherent_impl",
1394 group: "restriction",
1395 desc: "Multiple inherent impl that could be grouped",
1397 module: "inherent_impl",
1400 name: "must_use_candidate",
1402 desc: "function or method that could take a `#[must_use]` attribute",
1404 module: "functions",
1407 name: "must_use_unit",
1409 desc: "`#[must_use]` attribute on a unit-returning function / method",
1411 module: "functions",
1414 name: "mut_from_ref",
1415 group: "correctness",
1416 desc: "fns that create mutable refs from immutable ref args",
1423 desc: "usage of double-mut refs, e.g., `&mut &mut ...`",
1428 name: "mut_range_bound",
1429 group: "complexity",
1430 desc: "for loop over a range where one of the bounds is a mutable variable",
1435 name: "mutable_key_type",
1436 group: "correctness",
1437 desc: "Check for mutable `Map`/`Set` key type",
1442 name: "mutex_atomic",
1444 desc: "using a mutex where an atomic value could be used instead",
1446 module: "mutex_atomic",
1449 name: "mutex_integer",
1451 desc: "using a mutex for an integer type",
1453 module: "mutex_atomic",
1456 name: "naive_bytecount",
1458 desc: "use of naive `<slice>.filter(|&x| x == y).count()` to count byte values",
1460 module: "bytecount",
1463 name: "needless_bool",
1464 group: "complexity",
1465 desc: "if-statements with plain booleans in the then- and else-clause, e.g., `if p { true } else { false }`",
1467 module: "needless_bool",
1470 name: "needless_borrow",
1472 desc: "taking a reference that is going to be automatically dereferenced",
1474 module: "needless_borrow",
1477 name: "needless_borrowed_reference",
1478 group: "complexity",
1479 desc: "taking a needless borrowed reference",
1481 module: "needless_borrowed_ref",
1484 name: "needless_collect",
1486 desc: "collecting an iterator when collect is not needed",
1491 name: "needless_continue",
1493 desc: "`continue` statements that can be replaced by a rearrangement of code",
1495 module: "needless_continue",
1498 name: "needless_doctest_main",
1500 desc: "presence of `fn main() {` in code examples",
1505 name: "needless_lifetimes",
1506 group: "complexity",
1507 desc: "using explicit lifetimes for references in function arguments when elision rules would allow omitting them",
1509 module: "lifetimes",
1512 name: "needless_pass_by_value",
1514 desc: "functions taking arguments by value, but not consuming them in its body",
1516 module: "needless_pass_by_value",
1519 name: "needless_range_loop",
1521 desc: "for-looping over a range of indices where an iterator over items would do",
1526 name: "needless_return",
1528 desc: "using a return statement like `return expr;` where an expression would suffice",
1533 name: "needless_update",
1534 group: "complexity",
1535 desc: "using `Foo { ..base }` when there are no missing fields",
1537 module: "needless_update",
1540 name: "neg_cmp_op_on_partial_ord",
1541 group: "complexity",
1542 desc: "The use of negated comparison operators on partially ordered types may produce confusing code.",
1544 module: "neg_cmp_op_on_partial_ord",
1547 name: "neg_multiply",
1549 desc: "multiplying integers with `-1`",
1551 module: "neg_multiply",
1555 group: "correctness",
1556 desc: "any loop that will always `break` or `return`",
1561 name: "new_ret_no_self",
1563 desc: "not returning type containing `Self` in a `new` method",
1568 name: "new_without_default",
1570 desc: "`fn new() -> Self` method without `Default` implementation",
1572 module: "new_without_default",
1576 group: "complexity",
1577 desc: "statements with no effect",
1579 module: "no_effect",
1582 name: "non_ascii_literal",
1584 desc: "using any literal non-ASCII chars in a string literal instead of using the `\\\\u` escape",
1589 name: "nonminimal_bool",
1590 group: "complexity",
1591 desc: "boolean expressions that can be written more concisely",
1596 name: "nonsensical_open_options",
1597 group: "correctness",
1598 desc: "nonsensical combination of options for opening a file",
1600 module: "open_options",
1603 name: "not_unsafe_ptr_arg_deref",
1604 group: "correctness",
1605 desc: "public functions dereferencing raw pointer arguments but not marked `unsafe`",
1607 module: "functions",
1612 desc: "using `ok().expect()`, which gives worse error messages than calling `expect` directly on the Result",
1619 desc: "taking a reference to satisfy the type constraints on `==`",
1624 name: "option_as_ref_deref",
1625 group: "complexity",
1626 desc: "using `as_ref().map(Deref::deref)`, which is more succinctly expressed as `as_deref()`",
1631 name: "option_env_unwrap",
1632 group: "correctness",
1633 desc: "using `option_env!(...).unwrap()` to get environment variable",
1635 module: "option_env_unwrap",
1638 name: "option_if_let_else",
1640 desc: "reimplementation of Option::map_or",
1642 module: "option_if_let_else",
1645 name: "option_map_or_none",
1647 desc: "using `Option.map_or(None, f)`, which is more succinctly expressed as `and_then(f)`",
1652 name: "option_map_unit_fn",
1653 group: "complexity",
1654 desc: "using `option.map(f)`, where `f` is a function or closure that returns `()`",
1656 module: "map_unit_fn",
1659 name: "option_option",
1661 desc: "usage of `Option<Option<T>>`",
1666 name: "or_fun_call",
1668 desc: "using any `*or` method with a function call, which suggests `*or_else`",
1673 name: "out_of_bounds_indexing",
1674 group: "correctness",
1675 desc: "out of bounds constant indexing",
1677 module: "indexing_slicing",
1680 name: "overflow_check_conditional",
1681 group: "complexity",
1682 desc: "overflow checks inspired by C which are likely to panic",
1684 module: "overflow_check_conditional",
1688 group: "restriction",
1689 desc: "usage of the `panic!` macro",
1691 module: "panic_unimplemented",
1694 name: "panic_params",
1696 desc: "missing parameters in `panic!` calls",
1698 module: "panic_unimplemented",
1701 name: "panicking_unwrap",
1702 group: "correctness",
1703 desc: "checks for calls of `unwrap[_err]()` that will always fail",
1708 name: "partialeq_ne_impl",
1709 group: "complexity",
1710 desc: "re-implementing `PartialEq::ne`",
1712 module: "partialeq_ne_impl",
1715 name: "path_buf_push_overwrite",
1717 desc: "calling `push` with file system root on `PathBuf` can overwrite it",
1719 module: "path_buf_push_overwrite",
1722 name: "pattern_type_mismatch",
1723 group: "restriction",
1724 desc: "type of pattern does not match the expression type",
1726 module: "pattern_type_mismatch",
1729 name: "possible_missing_comma",
1730 group: "correctness",
1731 desc: "possible missing comma in array",
1733 module: "formatting",
1737 group: "complexity",
1738 desc: "operations where precedence may be unclear",
1740 module: "precedence",
1743 name: "print_literal",
1745 desc: "printing a literal with a format string",
1750 name: "print_stdout",
1751 group: "restriction",
1752 desc: "printing on stdout",
1757 name: "print_with_newline",
1759 desc: "using `print!()` with a format string that ends in a single newline",
1764 name: "println_empty_string",
1766 desc: "using `println!(\"\")` with an empty string",
1773 desc: "fn arguments of the type `&Vec<...>` or `&String`, suggesting to use `&[...]` or `&str` instead, respectively",
1778 name: "ptr_offset_with_cast",
1779 group: "complexity",
1780 desc: "unneeded pointer offset cast",
1782 module: "ptr_offset_with_cast",
1785 name: "pub_enum_variant_names",
1787 desc: "public enums where all variants share a prefix/postfix",
1789 module: "enum_variants",
1792 name: "question_mark",
1794 desc: "checks for expressions that could be replaced by the question mark operator",
1796 module: "question_mark",
1799 name: "range_minus_one",
1801 desc: "`x..=(y-1)` reads better as `x..y`",
1806 name: "range_plus_one",
1808 desc: "`x..(y+1)` reads better as `x..=y`",
1813 name: "range_zip_with_len",
1814 group: "complexity",
1815 desc: "zipping iterator with a range when `enumerate()` would do",
1820 name: "redundant_allocation",
1822 desc: "redundant allocation",
1827 name: "redundant_clone",
1829 desc: "`clone()` of an owned value that is going to be dropped immediately",
1831 module: "redundant_clone",
1834 name: "redundant_closure",
1836 desc: "redundant closures, i.e., `|a| foo(a)` (which can be written as just `foo`)",
1838 module: "eta_reduction",
1841 name: "redundant_closure_call",
1842 group: "complexity",
1843 desc: "throwaway closures called in the expression they are defined",
1845 module: "redundant_closure_call",
1848 name: "redundant_closure_for_method_calls",
1850 desc: "redundant closures for method calls",
1852 module: "eta_reduction",
1855 name: "redundant_field_names",
1857 desc: "checks for fields in struct literals where shorthands could be used",
1859 module: "redundant_field_names",
1862 name: "redundant_pattern",
1864 desc: "using `name @ _` in a pattern",
1866 module: "misc_early",
1869 name: "redundant_pattern_matching",
1871 desc: "use the proper utility function avoiding an `if let`",
1876 name: "redundant_pub_crate",
1878 desc: "Using `pub(crate)` visibility on items that are not crate visible due to the visibility of the module that contains them.",
1880 module: "redundant_pub_crate",
1883 name: "redundant_static_lifetimes",
1885 desc: "Using explicit `\'static` lifetime for constants or statics when elision rules would allow omitting them.",
1887 module: "redundant_static_lifetimes",
1890 name: "ref_in_deref",
1891 group: "complexity",
1892 desc: "Use of reference in auto dereference expression.",
1894 module: "reference",
1897 name: "repeat_once",
1898 group: "complexity",
1899 desc: "using `.repeat(1)` instead of `String.clone()`, `str.to_string()` or `slice.to_vec()` ",
1901 module: "repeat_once",
1904 name: "rest_pat_in_fully_bound_structs",
1905 group: "restriction",
1906 desc: "a match on a struct that binds all fields but still uses the wildcard pattern",
1911 name: "result_map_or_into_option",
1913 desc: "using `Result.map_or(None, Some)`, which is more succinctly expressed as `ok()`",
1918 name: "result_map_unit_fn",
1919 group: "complexity",
1920 desc: "using `result.map(f)`, where `f` is a function or closure that returns `()`",
1922 module: "map_unit_fn",
1925 name: "reversed_empty_ranges",
1926 group: "correctness",
1927 desc: "reversing the limits of range expressions, resulting in empty ranges",
1932 name: "same_functions_in_if_condition",
1934 desc: "consecutive `if`s with the same function call",
1939 name: "search_is_some",
1940 group: "complexity",
1941 desc: "using an iterator search followed by `is_some()`, which is more succinctly expressed as a call to `any()`",
1946 name: "serde_api_misuse",
1947 group: "correctness",
1948 desc: "various things that will negatively affect your serde experience",
1950 module: "serde_api",
1953 name: "shadow_reuse",
1954 group: "restriction",
1955 desc: "rebinding a name to an expression that re-uses the original value, e.g., `let x = x + 1`",
1960 name: "shadow_same",
1961 group: "restriction",
1962 desc: "rebinding a name to itself, e.g., `let mut x = &mut x`",
1967 name: "shadow_unrelated",
1969 desc: "rebinding a name without even using the original value",
1974 name: "short_circuit_statement",
1975 group: "complexity",
1976 desc: "using a short circuit boolean condition as a statement",
1981 name: "should_implement_trait",
1983 desc: "defining a method that should be implementing a std trait",
1988 name: "similar_names",
1990 desc: "similarly named items and bindings",
1992 module: "non_expressive_names",
1995 name: "single_char_pattern",
1997 desc: "using a single-character str where a char could be used, e.g., `_.split(\"x\")`",
2002 name: "single_component_path_imports",
2004 desc: "imports with single component path are redundant",
2006 module: "single_component_path_imports",
2009 name: "single_match",
2011 desc: "a `match` statement with a single nontrivial arm (i.e., where the other arm is `_ => {}`) instead of `if let`",
2016 name: "single_match_else",
2018 desc: "a `match` statement with two arms where the second arm\'s pattern is a placeholder instead of a specific match pattern",
2023 name: "skip_while_next",
2024 group: "complexity",
2025 desc: "using `skip_while(p).next()`, which is more succinctly expressed as `.find(!p)`",
2030 name: "slow_vector_initialization",
2032 desc: "slow vector initialization",
2034 module: "slow_vector_initialization",
2038 group: "restriction",
2039 desc: "using `x + ..` where x is a `String` instead of `push_str()`",
2044 name: "string_add_assign",
2046 desc: "using `x = x + ..` where x is a `String` instead of `push_str()`",
2051 name: "string_extend_chars",
2053 desc: "using `x.extend(s.chars())` where s is a `&str` or `String`",
2058 name: "string_lit_as_bytes",
2060 desc: "calling `as_bytes` on a string literal instead of using a byte string literal",
2065 name: "struct_excessive_bools",
2067 desc: "using too many bools in a struct",
2069 module: "excessive_bools",
2072 name: "suboptimal_flops",
2074 desc: "usage of sub-optimal floating point operations",
2076 module: "floating_point_arithmetic",
2079 name: "suspicious_arithmetic_impl",
2080 group: "correctness",
2081 desc: "suspicious use of operators in impl of arithmetic trait",
2083 module: "suspicious_trait_impl",
2086 name: "suspicious_assignment_formatting",
2088 desc: "suspicious formatting of `*=`, `-=` or `!=`",
2090 module: "formatting",
2093 name: "suspicious_else_formatting",
2095 desc: "suspicious formatting of `else`",
2097 module: "formatting",
2100 name: "suspicious_map",
2101 group: "complexity",
2102 desc: "suspicious usage of map",
2107 name: "suspicious_op_assign_impl",
2108 group: "correctness",
2109 desc: "suspicious use of operators in impl of OpAssign trait",
2111 module: "suspicious_trait_impl",
2114 name: "suspicious_unary_op_formatting",
2116 desc: "suspicious formatting of unary `-` or `!` on the RHS of a BinOp",
2118 module: "formatting",
2121 name: "tabs_in_doc_comments",
2123 desc: "using tabs in doc comments is not recommended",
2125 module: "tabs_in_doc_comments",
2128 name: "temporary_assignment",
2129 group: "complexity",
2130 desc: "assignments to temporaries",
2132 module: "temporary_assignment",
2135 name: "temporary_cstring_as_ptr",
2136 group: "correctness",
2137 desc: "getting the inner pointer of a temporary `CString`",
2142 name: "to_digit_is_some",
2144 desc: "`char.is_digit()` is clearer",
2146 module: "to_digit_is_some",
2150 group: "restriction",
2151 desc: "`todo!` should not be present in production code",
2153 module: "panic_unimplemented",
2156 name: "too_many_arguments",
2157 group: "complexity",
2158 desc: "functions with too many arguments",
2160 module: "functions",
2163 name: "too_many_lines",
2165 desc: "functions with too many lines",
2167 module: "functions",
2170 name: "toplevel_ref_arg",
2172 desc: "an entire binding declared as `ref`, in a function argument or a `let` statement",
2177 name: "transmute_bytes_to_str",
2178 group: "complexity",
2179 desc: "transmutes from a `&[u8]` to a `&str`",
2181 module: "transmute",
2184 name: "transmute_float_to_int",
2185 group: "complexity",
2186 desc: "transmutes from a float to an integer",
2188 module: "transmute",
2191 name: "transmute_int_to_bool",
2192 group: "complexity",
2193 desc: "transmutes from an integer to a `bool`",
2195 module: "transmute",
2198 name: "transmute_int_to_char",
2199 group: "complexity",
2200 desc: "transmutes from an integer to a `char`",
2202 module: "transmute",
2205 name: "transmute_int_to_float",
2206 group: "complexity",
2207 desc: "transmutes from an integer to a float",
2209 module: "transmute",
2212 name: "transmute_ptr_to_ptr",
2213 group: "complexity",
2214 desc: "transmutes from a pointer to a pointer / a reference to a reference",
2216 module: "transmute",
2219 name: "transmute_ptr_to_ref",
2220 group: "complexity",
2221 desc: "transmutes from a pointer to a reference type",
2223 module: "transmute",
2226 name: "transmuting_null",
2227 group: "correctness",
2228 desc: "transmutes from a null pointer to a reference, which is undefined behavior",
2230 module: "transmuting_null",
2233 name: "trivial_regex",
2235 desc: "trivial regular expressions",
2240 name: "trivially_copy_pass_by_ref",
2242 desc: "functions taking small copyable arguments by reference",
2244 module: "trivially_copy_pass_by_ref",
2249 desc: "return errors explicitly rather than hiding them behind a `?`",
2254 name: "type_complexity",
2255 group: "complexity",
2256 desc: "usage of very complex types that might be better factored into `type` definitions",
2261 name: "type_repetition_in_bounds",
2263 desc: "Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`",
2265 module: "trait_bounds",
2268 name: "unicode_not_nfc",
2270 desc: "using a Unicode literal not in NFC normal form (see [Unicode tr15](http://www.unicode.org/reports/tr15/) for further information)",
2275 name: "unimplemented",
2276 group: "restriction",
2277 desc: "`unimplemented!` should not be present in production code",
2279 module: "panic_unimplemented",
2282 name: "uninit_assumed_init",
2283 group: "correctness",
2284 desc: "`MaybeUninit::uninit().assume_init()`",
2290 group: "complexity",
2291 desc: "passing unit to a function",
2297 group: "correctness",
2298 desc: "comparing unit values",
2303 name: "unit_return_expecting_ord",
2304 group: "correctness",
2305 desc: "fn arguments of type Fn(...) -> Ord returning the unit type ().",
2307 module: "unit_return_expecting_ord",
2310 name: "unknown_clippy_lints",
2312 desc: "unknown_lints for scoped Clippy lints",
2317 name: "unnecessary_cast",
2318 group: "complexity",
2319 desc: "cast to the same type, e.g., `x as i32` where `x: i32`",
2324 name: "unnecessary_filter_map",
2325 group: "complexity",
2326 desc: "using `filter_map` when a more succinct alternative exists",
2331 name: "unnecessary_fold",
2333 desc: "using `fold` when a more succinct alternative exists",
2338 name: "unnecessary_mut_passed",
2340 desc: "an argument passed as a mutable reference although the callee only demands an immutable reference",
2342 module: "mut_reference",
2345 name: "unnecessary_operation",
2346 group: "complexity",
2347 desc: "outer expressions with no effect",
2349 module: "no_effect",
2352 name: "unnecessary_sort_by",
2353 group: "complexity",
2354 desc: "Use of `Vec::sort_by` when `Vec::sort_by_key` or `Vec::sort` would be clearer",
2356 module: "unnecessary_sort_by",
2359 name: "unnecessary_unwrap",
2360 group: "complexity",
2361 desc: "checks for calls of `unwrap[_err]()` that cannot fail",
2366 name: "unneeded_field_pattern",
2367 group: "restriction",
2368 desc: "struct fields bound to a wildcard instead of using `..`",
2370 module: "misc_early",
2373 name: "unneeded_wildcard_pattern",
2374 group: "complexity",
2375 desc: "tuple patterns with a wildcard pattern (`_`) is next to a rest pattern (`..`)",
2377 module: "misc_early",
2380 name: "unnested_or_patterns",
2382 desc: "unnested or-patterns, e.g., `Foo(Bar) | Foo(Baz) instead of `Foo(Bar | Baz)`",
2384 module: "unnested_or_patterns",
2387 name: "unreachable",
2388 group: "restriction",
2389 desc: "`unreachable!` should not be present in production code",
2391 module: "panic_unimplemented",
2394 name: "unreadable_literal",
2396 desc: "long integer literal without underscores",
2398 module: "literal_representation",
2401 name: "unsafe_derive_deserialize",
2403 desc: "deriving `serde::Deserialize` on a type that has methods using `unsafe`",
2408 name: "unsafe_removed_from_name",
2410 desc: "`unsafe` removed from API names on import",
2412 module: "unsafe_removed_from_name",
2415 name: "unseparated_literal_suffix",
2417 desc: "literals whose suffix is not separated by an underscore",
2419 module: "misc_early",
2422 name: "unsound_collection_transmute",
2423 group: "correctness",
2424 desc: "transmute between collections of layout-incompatible types",
2426 module: "transmute",
2429 name: "unused_io_amount",
2430 group: "correctness",
2431 desc: "unused written/read amount",
2433 module: "unused_io_amount",
2436 name: "unused_self",
2438 desc: "methods that contain a `self` argument but don\'t use it",
2440 module: "unused_self",
2443 name: "unused_unit",
2445 desc: "needless unit expression",
2450 name: "unwrap_used",
2451 group: "restriction",
2452 desc: "using `.unwrap()` on `Result` or `Option`, which should at least get a better message using `expect()`",
2458 group: "restriction",
2459 desc: "use of `Debug`-based formatting",
2466 desc: "Unnecessary structure name repetition whereas `Self` is applicable",
2471 name: "used_underscore_binding",
2473 desc: "using a binding which is prefixed with an underscore",
2478 name: "useless_asref",
2479 group: "complexity",
2480 desc: "using `as_ref` where the types before and after the call are the same",
2485 name: "useless_attribute",
2486 group: "correctness",
2487 desc: "use of lint attributes on `extern crate` items",
2492 name: "useless_conversion",
2493 group: "complexity",
2494 desc: "calls to `Into`, `TryInto`, `From`, `TryFrom`, `IntoIter` that performs useless conversions to the same type",
2496 module: "useless_conversion",
2499 name: "useless_format",
2500 group: "complexity",
2501 desc: "useless use of `format!`",
2506 name: "useless_let_if_seq",
2508 desc: "unidiomatic `let mut` declaration followed by initialization in `if`",
2510 module: "let_if_seq",
2513 name: "useless_transmute",
2515 desc: "transmutes that have the same to and from types or could be a cast/coercion",
2517 module: "transmute",
2520 name: "useless_vec",
2522 desc: "useless `vec!`",
2528 group: "complexity",
2529 desc: "usage of `Vec<Box<T>>` where T: Sized, vector elements are already on the heap",
2534 name: "vec_resize_to_zero",
2535 group: "correctness",
2536 desc: "emptying a vector with `resize(0, an_int)` instead of `clear()` is probably an argument inversion mistake",
2538 module: "vec_resize_to_zero",
2541 name: "verbose_bit_mask",
2543 desc: "expressions where a bit mask is less readable than the corresponding method call",
2548 name: "verbose_file_reads",
2549 group: "restriction",
2550 desc: "use of `File::read_to_end` or `File::read_to_string`",
2552 module: "verbose_file_reads",
2555 name: "vtable_address_comparisons",
2556 group: "correctness",
2557 desc: "comparison with an address of a trait vtable",
2559 module: "unnamed_address",
2562 name: "while_immutable_condition",
2563 group: "correctness",
2564 desc: "variables used within while expression are not mutated in the body",
2569 name: "while_let_loop",
2570 group: "complexity",
2571 desc: "`loop { if let { ... } else break }`, which can be written as a `while let` loop",
2576 name: "while_let_on_iterator",
2578 desc: "using a while-let loop instead of a for loop on an iterator",
2583 name: "wildcard_dependencies",
2585 desc: "wildcard dependencies being used",
2587 module: "wildcard_dependencies",
2590 name: "wildcard_enum_match_arm",
2591 group: "restriction",
2592 desc: "a wildcard enum match arm using `_`",
2597 name: "wildcard_imports",
2599 desc: "lint `use _::*` statements",
2601 module: "wildcard_imports",
2604 name: "wildcard_in_or_patterns",
2605 group: "complexity",
2606 desc: "a wildcard pattern used with others patterns in same match arm",
2611 name: "write_literal",
2613 desc: "writing a literal with a format string",
2618 name: "write_with_newline",
2620 desc: "using `write!()` with a format string that ends in a single newline",
2625 name: "writeln_empty_string",
2627 desc: "using `writeln!(buf, \"\")` with an empty string",
2632 name: "wrong_pub_self_convention",
2633 group: "restriction",
2634 desc: "defining a public method named with an established prefix (like \"into_\") that takes `self` with the wrong convention",
2639 name: "wrong_self_convention",
2641 desc: "defining a method named with an established prefix (like \"into_\") that takes `self` with the wrong convention",
2646 name: "wrong_transmute",
2647 group: "correctness",
2648 desc: "transmutes that are confusing at best, undefined behaviour at worst and always useless",
2650 module: "transmute",
2653 name: "zero_divided_by_zero",
2654 group: "complexity",
2655 desc: "usage of `0.0 / 0.0` to obtain NaN instead of `f32::NAN` or `f64::NAN`",
2657 module: "zero_div_zero",
2660 name: "zero_prefixed_literal",
2661 group: "complexity",
2662 desc: "integer literals starting with `0`",
2664 module: "misc_early",
2669 desc: "using `0 as *{const, mut} T`",
2674 name: "zero_width_space",
2675 group: "correctness",
2676 desc: "using a zero-width space in a string literal, which is confusing",
2682 group: "correctness",
2683 desc: "Check for offset calculations on raw pointers to zero-sized types",
2688 // end lint list, do not remove this comment, it’s used in `update_lints`