description: r##"Checks for comparisons where one side of the relation is\neither the minimum or maximum value for its type and warns if it involves a\ncase that is always true or always false. Only integer and boolean types are\nchecked."##,
},
LintCompletion{
label: "clippy::almost_swapped",
description: r##"Checks for `foo = bar; bar = foo` sequences."##,
},
LintCompletion{
label: "clippy::approx_constant",
description: r##"Checks for floating point literals that approximate\nconstants which are defined in\n[`std::f32::consts`](https://doc.rust-lang.org/stable/std/f32/consts/#constants)\nor\n[`std::f64::consts`](https://doc.rust-lang.org/stable/std/f64/consts/#constants),\nrespectively, suggesting to use the predefined constant."##,
},
LintCompletion{
label: "clippy::as_conversions",
description: r##"Checks for usage of `as` conversions.\n\nNote that this lint is specialized in linting *every single* use of `as`\nregardless of whether good alternatives exist or not.\nIf you want more precise lints for `as`, please consider using these separate lints:\n`unnecessary_cast`, `cast_lossless/possible_truncation/possible_wrap/precision_loss/sign_loss`,\n`fn_to_numeric_cast(_with_truncation)`, `char_lit_as_u8`, `ref_to_mut` and `ptr_as_ptr`.\nThere is a good explanation the reason why this lint should work in this way and how it is useful\n[in this issue](https://github.com/rust-lang/rust-clippy/issues/5122)."##,
},
LintCompletion{
label: "clippy::assertions_on_constants",
description: r##"Checks for `assert!(true)` and `assert!(false)` calls."##,
},
LintCompletion{
label: "clippy::assign_op_pattern",
description: r##"Checks for `a = a op b` or `a = b commutative_op a`\npatterns."##,
},
LintCompletion{
label: "clippy::assign_ops",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::async_yields_async",
description: r##"Checks for async blocks that yield values of types\nthat can themselves be awaited."##,
},
LintCompletion{
label: "clippy::await_holding_lock",
description: r##"Checks for calls to await while holding a\nnon-async-aware MutexGuard."##,
},
LintCompletion{
label: "clippy::await_holding_refcell_ref",
description: r##"Checks for calls to await while holding a\n`RefCell` `Ref` or `RefMut`."##,
},
LintCompletion{
label: "clippy::bad_bit_mask",
description: r##"Checks for incompatible bit masks in comparisons.\n\nThe formula for detecting if an expression of the type `_ <bit_op> m\n<cmp_op> c` (where `<bit_op>` is one of {`&`, `|`} and `<cmp_op>` is one of\n{`!=`, `>=`, `>`, `!=`, `>=`, `>`}) can be determined from the following\ntable:\n\n|Comparison |Bit Op|Example |is always|Formula |\n|------------|------|------------|---------|----------------------|\n|`==` or `!=`| `&` |`x & 2 == 3`|`false` |`c & m != c` |\n|`<` or `>=`| `&` |`x & 2 < 3` |`true` |`m < c` |\n|`>` or `<=`| `&` |`x & 1 > 1` |`false` |`m <= c` |\n|`==` or `!=`| `|` |`x | 1 == 0`|`false` |`c | m != c` |\n|`<` or `>=`| `|` |`x | 1 < 1` |`false` |`m >= c` |\n|`<=` or `>` | `|` |`x | 1 > 0` |`true` |`m > c` |"##,
},
LintCompletion{
label: "clippy::bind_instead_of_map",
description: r##"Checks for usage of `_.and_then(|x| Some(y))`, `_.and_then(|x| Ok(y))` or\n`_.or_else(|x| Err(y))`."##,
},
LintCompletion{
label: "clippy::blacklisted_name",
description: r##"Checks for usage of blacklisted names for variables, such\nas `foo`."##,
description: r##"Checks for `warn`/`deny`/`forbid` attributes targeting the whole clippy::restriction category."##,
},
LintCompletion{
label: "clippy::blocks_in_if_conditions",
description: r##"Checks for `if` conditions that use blocks containing an\nexpression, statements or conditions that use closures with blocks."##,
},
LintCompletion{
label: "clippy::bool_comparison",
description: r##"Checks for expressions of the form `x == true`,\n`x != true` and order comparisons such as `x < true` (or vice versa) and\nsuggest using the variable directly."##,
},
LintCompletion{
label: "clippy::borrow_interior_mutable_const",
description: r##"Checks if `const` items which is interior mutable (e.g.,\ncontains a `Cell`, `Mutex`, `AtomicXxxx`, etc.) has been borrowed directly."##,
},
LintCompletion{
label: "clippy::borrowed_box",
description: r##"Checks for use of `&Box<T>` anywhere in the code.\nCheck the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##,
},
LintCompletion{
label: "clippy::box_vec",
description: r##"Checks for use of `Box<Vec<_>>` anywhere in the code.\nCheck the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##,
},
LintCompletion{
label: "clippy::boxed_local",
description: r##"Checks for usage of `Box<T>` where an unboxed `T` would\nwork fine."##,
},
LintCompletion{
label: "clippy::builtin_type_shadow",
description: r##"Warns if a generic shadows a built-in type."##,
},
LintCompletion{
label: "clippy::bytes_nth",
description: r##"Checks for the use of `.bytes().nth()`."##,
},
LintCompletion{
label: "clippy::cargo_common_metadata",
description: r##"Checks to see if all common metadata is defined in\n`Cargo.toml`. See: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#cargotoml-includes-all-common-metadata-c-metadata"##,
description: r##"Checks for calls to `ends_with` with possible file extensions\nand suggests to use a case-insensitive approach instead."##,
},
LintCompletion{
label: "clippy::cast_lossless",
description: r##"Checks for casts between numerical types that may\nbe replaced by safe conversion functions."##,
},
LintCompletion{
label: "clippy::cast_possible_truncation",
description: r##"Checks for casts between numerical types that may\ntruncate large values. This is expected behavior, so the cast is `Allow` by\ndefault."##,
},
LintCompletion{
label: "clippy::cast_possible_wrap",
description: r##"Checks for casts from an unsigned type to a signed type of\nthe same size. Performing such a cast is a 'no-op' for the compiler,\ni.e., nothing is changed at the bit level, and the binary representation of\nthe value is reinterpreted. This can cause wrapping if the value is too big\nfor the target signed type. However, the cast works as defined, so this lint\nis `Allow` by default."##,
},
LintCompletion{
label: "clippy::cast_precision_loss",
description: r##"Checks for casts from any numerical to a float type where\nthe receiving type cannot store all values from the original type without\nrounding errors. This possible rounding is to be expected, so this lint is\n`Allow` by default.\n\nBasically, this warns on casting any integer with 32 or more bits to `f32`\nor any 64-bit integer to `f64`."##,
},
LintCompletion{
label: "clippy::cast_ptr_alignment",
description: r##"Checks for casts, using `as` or `pointer::cast`,\nfrom a less-strictly-aligned pointer to a more-strictly-aligned pointer"##,
},
LintCompletion{
label: "clippy::cast_ref_to_mut",
description: r##"Checks for casts of `&T` to `&mut T` anywhere in the code."##,
},
LintCompletion{
label: "clippy::cast_sign_loss",
description: r##"Checks for casts from a signed to an unsigned numerical\ntype. In this case, negative values wrap around to large positive values,\nwhich can be quite surprising in practice. However, as the cast works as\ndefined, this lint is `Allow` by default."##,
},
LintCompletion{
label: "clippy::char_lit_as_u8",
description: r##"Checks for expressions where a character literal is cast\nto `u8` and suggests using a byte literal instead."##,
},
LintCompletion{
label: "clippy::chars_last_cmp",
description: r##"Checks for usage of `_.chars().last()` or\n`_.chars().next_back()` on a `str` to check if it ends with a given char."##,
},
LintCompletion{
label: "clippy::chars_next_cmp",
description: r##"Checks for usage of `.chars().next()` on a `str` to check\nif it starts with a given char."##,
},
LintCompletion{
label: "clippy::checked_conversions",
description: r##"Checks for explicit bounds checking when casting."##,
},
LintCompletion{
label: "clippy::clone_double_ref",
description: r##"Checks for usage of `.clone()` on an `&&T`."##,
},
LintCompletion{
label: "clippy::clone_on_copy",
description: r##"Checks for usage of `.clone()` on a `Copy` type."##,
},
LintCompletion{
label: "clippy::clone_on_ref_ptr",
description: r##"Checks for usage of `.clone()` on a ref-counted pointer,\n(`Rc`, `Arc`, `rc::Weak`, or `sync::Weak`), and suggests calling Clone via unified\nfunction syntax instead (e.g., `Rc::clone(foo)`)."##,
},
LintCompletion{label: "clippy::cmp_nan",description: r##"Checks for comparisons to NaN."##},
LintCompletion{
label: "clippy::cmp_null",
description: r##"This lint checks for equality comparisons with `ptr::null`"##,
},
LintCompletion{
label: "clippy::cmp_owned",
description: r##"Checks for conversions to owned values just for the sake\nof a comparison."##,
},
LintCompletion{
label: "clippy::cognitive_complexity",
description: r##"Checks for methods with high cognitive complexity."##,
},
LintCompletion{
label: "clippy::collapsible_else_if",
description: r##"Checks for collapsible `else { if ... }` expressions\nthat can be collapsed to `else if ...`."##,
},
LintCompletion{
label: "clippy::collapsible_if",
description: r##"Checks for nested `if` statements which can be collapsed\nby `&&`-combining their conditions."##,
},
LintCompletion{
label: "clippy::collapsible_match",
description: r##"Finds nested `match` or `if let` expressions where the patterns may be \"collapsed\" together\nwithout adding any branches.\n\nNote that this lint is not intended to find _all_ cases where nested match patterns can be merged, but only\ncases where merging would most likely make the code more readable."##,
},
LintCompletion{
label: "clippy::comparison_chain",
description: r##"Checks comparison chains written with `if` that can be\nrewritten with `match` and `cmp`."##,
},
LintCompletion{
label: "clippy::comparison_to_empty",
description: r##"Checks for comparing to an empty slice such as `\"\"` or `[]`,\nand suggests using `.is_empty()` where applicable."##,
},
LintCompletion{
label: "clippy::copy_iterator",
description: r##"Checks for types that implement `Copy` as well as\n`Iterator`."##,
},
LintCompletion{
label: "clippy::create_dir",
description: r##"Checks usage of `std::fs::create_dir` and suggest using `std::fs::create_dir_all` instead."##,
},
LintCompletion{
label: "clippy::crosspointer_transmute",
description: r##"Checks for transmutes between a type `T` and `*T`."##,
},
LintCompletion{
label: "clippy::dbg_macro",
description: r##"Checks for usage of dbg!() macro."##,
},
LintCompletion{
label: "clippy::debug_assert_with_mut_call",
description: r##"Checks for function/method calls with a mutable\nparameter in `debug_assert!`, `debug_assert_eq!` and `debug_assert_ne!` macros."##,
},
LintCompletion{
label: "clippy::decimal_literal_representation",
description: r##"Warns if there is a better representation for a numeric literal."##,
},
LintCompletion{
label: "clippy::declare_interior_mutable_const",
description: r##"Checks for declaration of `const` items which is interior\nmutable (e.g., contains a `Cell`, `Mutex`, `AtomicXxxx`, etc.)."##,
},
LintCompletion{
label: "clippy::default_numeric_fallback",
description: r##"Checks for usage of unconstrained numeric literals which may cause default numeric fallback in type\ninference.\n\nDefault numeric fallback means that if numeric types have not yet been bound to concrete\ntypes at the end of type inference, then integer type is bound to `i32`, and similarly\nfloating type is bound to `f64`.\n\nSee [RFC0212](https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md) for more information about the fallback."##,
},
LintCompletion{
label: "clippy::default_trait_access",
description: r##"Checks for literal calls to `Default::default()`."##,
},
LintCompletion{
label: "clippy::deprecated_cfg_attr",
description: r##"Checks for `#[cfg_attr(rustfmt, rustfmt_skip)]` and suggests to replace it\nwith `#[rustfmt::skip]`."##,
},
LintCompletion{
label: "clippy::deprecated_semver",
description: r##"Checks for `#[deprecated]` annotations with a `since`\nfield that is not a valid semantic version."##,
},
LintCompletion{
label: "clippy::deref_addrof",
description: r##"Checks for usage of `*&` and `*&mut` in expressions."##,
},
LintCompletion{
label: "clippy::derive_hash_xor_eq",
description: r##"Checks for deriving `Hash` but implementing `PartialEq`\nexplicitly or vice versa."##,
},
LintCompletion{
label: "clippy::derive_ord_xor_partial_ord",
description: r##"Checks for deriving `Ord` but implementing `PartialOrd`\nexplicitly or vice versa."##,
},
LintCompletion{
label: "clippy::disallowed_method",
description: r##"Denies the configured methods and functions in clippy.toml"##,
},
LintCompletion{
label: "clippy::diverging_sub_expression",
description: r##"Checks for diverging calls that are not match arms or\nstatements."##,
},
LintCompletion{
label: "clippy::doc_markdown",
description: r##"Checks for the presence of `_`, `::` or camel-case words\noutside ticks in documentation."##,
},
LintCompletion{
label: "clippy::double_comparisons",
description: r##"Checks for double comparisons that could be simplified to a single expression."##,
},
LintCompletion{
label: "clippy::double_must_use",
description: r##"Checks for a [`#[must_use]`] attribute without\nfurther information on functions and methods that return a type already\nmarked as `#[must_use]`.\n\n[`#[must_use]`]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute"##,
},
LintCompletion{
label: "clippy::double_neg",
description: r##"Detects expressions of the form `--x`."##,
},
LintCompletion{
label: "clippy::double_parens",
description: r##"Checks for unnecessary double parentheses."##,
},
LintCompletion{
label: "clippy::drop_bounds",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::drop_copy",
description: r##"Checks for calls to `std::mem::drop` with a value\nthat derives the Copy trait"##,
},
LintCompletion{
label: "clippy::drop_ref",
description: r##"Checks for calls to `std::mem::drop` with a reference\ninstead of an owned value."##,
},
LintCompletion{
label: "clippy::duplicate_underscore_argument",
description: r##"Checks for function arguments having the similar names\ndiffering by an underscore."##,
},
LintCompletion{
label: "clippy::duration_subsec",
description: r##"Checks for calculation of subsecond microseconds or milliseconds\nfrom other `Duration` methods."##,
},
LintCompletion{
label: "clippy::else_if_without_else",
description: r##"Checks for usage of if expressions with an `else if` branch,\nbut without a final `else` branch."##,
},
LintCompletion{
label: "clippy::empty_enum",
description: r##"Checks for `enum`s with no variants.\n\nAs of this writing, the `never_type` is still a\nnightly-only experimental API. Therefore, this lint is only triggered\nif the `never_type` is enabled."##,
},
LintCompletion{
label: "clippy::empty_line_after_outer_attr",
description: r##"Checks for empty lines after outer attributes"##,
},
LintCompletion{
label: "clippy::empty_loop",
description: r##"Checks for empty `loop` expressions."##,
},
LintCompletion{
label: "clippy::enum_clike_unportable_variant",
description: r##"Checks for C-like enumerations that are\n`repr(isize/usize)` and have values that don't fit into an `i32`."##,
},
LintCompletion{
label: "clippy::enum_glob_use",
description: r##"Checks for `use Enum::*`."##,
},
LintCompletion{
label: "clippy::enum_variant_names",
description: r##"Detects enumeration variants that are prefixed or suffixed\nby the same characters."##,
},
LintCompletion{
label: "clippy::eq_op",
description: r##"Checks for equal operands to comparison, logical and\nbitwise, difference and division binary operators (`==`, `>`, etc., `&&`,\n`||`, `&`, `|`, `^`, `-` and `/`)."##,
},
LintCompletion{
label: "clippy::erasing_op",
description: r##"Checks for erasing operations, e.g., `x * 0`."##,
},
LintCompletion{
label: "clippy::eval_order_dependence",
description: r##"Checks for a read and a write to the same variable where\nwhether the read occurs before or after the write depends on the evaluation\norder of sub-expressions."##,
},
LintCompletion{
label: "clippy::excessive_precision",
description: r##"Checks for float literals with a precision greater\nthan that supported by the underlying type."##,
},
LintCompletion{
label: "clippy::exhaustive_enums",
description: r##"Warns on any exported `enum`s that are not tagged `#[non_exhaustive]`"##,
},
LintCompletion{
label: "clippy::exhaustive_structs",
description: r##"Warns on any exported `structs`s that are not tagged `#[non_exhaustive]`"##,
},
LintCompletion{
label: "clippy::exit",
description: r##"`exit()` terminates the program and doesn't provide a\nstack trace."##,
},
LintCompletion{
label: "clippy::expect_fun_call",
description: r##"Checks for calls to `.expect(&format!(...))`, `.expect(foo(..))`,\netc., and suggests to use `unwrap_or_else` instead"##,
},
LintCompletion{
label: "clippy::expect_used",
description: r##"Checks for `.expect()` calls on `Option`s and `Result`s."##,
},
LintCompletion{
label: "clippy::expl_impl_clone_on_copy",
description: r##"Checks for explicit `Clone` implementations for `Copy`\ntypes."##,
},
LintCompletion{
label: "clippy::explicit_counter_loop",
description: r##"Checks `for` loops over slices with an explicit counter\nand suggests the use of `.enumerate()`."##,
},
LintCompletion{
label: "clippy::explicit_deref_methods",
description: r##"Checks for explicit `deref()` or `deref_mut()` method calls."##,
},
LintCompletion{
label: "clippy::explicit_into_iter_loop",
description: r##"Checks for loops on `y.into_iter()` where `y` will do, and\nsuggests the latter."##,
},
LintCompletion{
label: "clippy::explicit_iter_loop",
description: r##"Checks for loops on `x.iter()` where `&x` will do, and\nsuggests the latter."##,
},
LintCompletion{
label: "clippy::explicit_write",
description: r##"Checks for usage of `write!()` / `writeln()!` which can be\nreplaced with `(e)print!()` / `(e)println!()`"##,
},
LintCompletion{
label: "clippy::extend_from_slice",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::extra_unused_lifetimes",
description: r##"Checks for lifetimes in generics that are never used\nanywhere else."##,
},
LintCompletion{
label: "clippy::fallible_impl_from",
description: r##"Checks for impls of `From<..>` that contain `panic!()` or `unwrap()`"##,
},
LintCompletion{
label: "clippy::field_reassign_with_default",
description: r##"Checks for immediate reassignment of fields initialized\nwith Default::default()."##,
},
LintCompletion{
label: "clippy::filetype_is_file",
description: r##"Checks for `FileType::is_file()`."##,
},
LintCompletion{
label: "clippy::filter_map",
description: r##"Checks for usage of `_.filter(_).map(_)`,\n`_.filter(_).flat_map(_)`, `_.filter_map(_).flat_map(_)` and similar."##,
},
LintCompletion{
label: "clippy::filter_map_identity",
description: r##"Checks for usage of `filter_map(|x| x)`."##,
},
LintCompletion{
label: "clippy::filter_map_next",
description: r##"Checks for usage of `_.filter_map(_).next()`."##,
},
LintCompletion{
label: "clippy::filter_next",
description: r##"Checks for usage of `_.filter(_).next()`."##,
},
LintCompletion{
label: "clippy::find_map",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::flat_map_identity",
description: r##"Checks for usage of `flat_map(|x| x)`."##,
},
LintCompletion{
label: "clippy::float_arithmetic",
description: r##"Checks for float arithmetic."##,
},
LintCompletion{
label: "clippy::float_cmp",
description: r##"Checks for (in-)equality comparisons on floating-point\nvalues (apart from zero), except in functions called `*eq*` (which probably\nimplement equality for a type involving floats)."##,
},
LintCompletion{
label: "clippy::float_cmp_const",
description: r##"Checks for (in-)equality comparisons on floating-point\nvalue and constant, except in functions called `*eq*` (which probably\nimplement equality for a type involving floats)."##,
},
LintCompletion{
label: "clippy::float_equality_without_abs",
description: r##"Checks for statements of the form `(a - b) < f32::EPSILON` or\n`(a - b) < f64::EPSILON`. Notes the missing `.abs()`."##,
},
LintCompletion{
label: "clippy::fn_address_comparisons",
description: r##"Checks for comparisons with an address of a function item."##,
},
LintCompletion{
label: "clippy::fn_params_excessive_bools",
description: r##"Checks for excessive use of\nbools in function definitions."##,
},
LintCompletion{
label: "clippy::fn_to_numeric_cast",
description: r##"Checks for casts of function pointers to something other than usize"##,
description: r##"Checks for casts of a function pointer to a numeric type not wide enough to\nstore address."##,
},
LintCompletion{
label: "clippy::for_kv_map",
description: r##"Checks for iterating a map (`HashMap` or `BTreeMap`) and\nignoring either the keys or values."##,
},
LintCompletion{
label: "clippy::for_loops_over_fallibles",
description: r##"Checks for `for` loops over `Option` or `Result` values."##,
},
LintCompletion{
label: "clippy::forget_copy",
description: r##"Checks for calls to `std::mem::forget` with a value that\nderives the Copy trait"##,
},
LintCompletion{
label: "clippy::forget_ref",
description: r##"Checks for calls to `std::mem::forget` with a reference\ninstead of an owned value."##,
},
LintCompletion{
label: "clippy::from_iter_instead_of_collect",
description: r##"Checks for `from_iter()` function calls on types that implement the `FromIterator`\ntrait."##,
},
LintCompletion{
label: "clippy::from_over_into",
description: r##"Searches for implementations of the `Into<..>` trait and suggests to implement `From<..>` instead."##,
},
LintCompletion{
label: "clippy::from_str_radix_10",
description: r##"Checks for function invocations of the form `primitive::from_str_radix(s, 10)`"##,
},
LintCompletion{
label: "clippy::future_not_send",
description: r##"This lint requires Future implementations returned from\nfunctions and methods to implement the `Send` marker trait. It is mostly\nused by library authors (public and internal) that target an audience where\nmultithreaded executors are likely to be used for running these Futures."##,
},
LintCompletion{
label: "clippy::get_last_with_len",
description: r##"Checks for using `x.get(x.len() - 1)` instead of\n`x.last()`."##,
},
LintCompletion{
label: "clippy::get_unwrap",
description: r##"Checks for use of `.get().unwrap()` (or\n`.get_mut().unwrap`) on a standard library type which implements `Index`"##,
},
LintCompletion{
label: "clippy::identity_op",
description: r##"Checks for identity operations, e.g., `x + 0`."##,
},
LintCompletion{
label: "clippy::if_let_mutex",
description: r##"Checks for `Mutex::lock` calls in `if let` expression\nwith lock calls in any of the else blocks."##,
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::if_let_some_result",
description: r##"* Checks for unnecessary `ok()` in if let."##,
},
LintCompletion{
label: "clippy::if_not_else",
description: r##"Checks for usage of `!` or `!=` in an if condition with an\nelse branch."##,
},
LintCompletion{
label: "clippy::if_same_then_else",
description: r##"Checks for `if/else` with the same body as the *then* part\nand the *else* part."##,
},
LintCompletion{
label: "clippy::ifs_same_cond",
description: r##"Checks for consecutive `if`s with the same condition."##,
},
LintCompletion{
label: "clippy::implicit_clone",
description: r##"Checks for the usage of `_.to_owned()`, `vec.to_vec()`, or similar when calling `_.clone()` would be clearer."##,
},
LintCompletion{
label: "clippy::implicit_hasher",
description: r##"Checks for public `impl` or `fn` missing generalization\nover different hashers and implicitly defaulting to the default hashing\nalgorithm (`SipHash`)."##,
},
LintCompletion{
label: "clippy::implicit_return",
description: r##"Checks for missing return statements at the end of a block."##,
},
LintCompletion{
label: "clippy::implicit_saturating_sub",
description: r##"Checks for implicit saturating subtraction."##,
},
LintCompletion{
label: "clippy::imprecise_flops",
description: r##"Looks for floating-point expressions that\ncan be expressed using built-in methods to improve accuracy\nat the cost of performance."##,
},
LintCompletion{
label: "clippy::inconsistent_digit_grouping",
description: r##"Warns if an integral or floating-point constant is\ngrouped inconsistently with underscores."##,
},
LintCompletion{
label: "clippy::inconsistent_struct_constructor",
description: r##"Checks for struct constructors where the order of the field init\nshorthand in the constructor is inconsistent with the order in the struct definition."##,
},
LintCompletion{
label: "clippy::indexing_slicing",
description: r##"Checks for usage of indexing or slicing. Arrays are special cases, this lint\ndoes report on arrays if we can tell that slicing operations are in bounds and does not\nlint on constant `usize` indexing on arrays because that is handled by rustc's `const_err` lint."##,
},
LintCompletion{
label: "clippy::ineffective_bit_mask",
description: r##"Checks for bit masks in comparisons which can be removed\nwithout changing the outcome. The basic structure can be seen in the\nfollowing table:\n\n|Comparison| Bit Op |Example |equals |\n|----------|---------|-----------|-------|\n|`>` / `<=`|`|` / `^`|`x | 2 > 3`|`x > 3`|\n|`<` / `>=`|`|` / `^`|`x ^ 1 < 4`|`x < 4`|"##,
},
LintCompletion{
label: "clippy::inefficient_to_string",
description: r##"Checks for usage of `.to_string()` on an `&&T` where\n`T` implements `ToString` directly (like `&&str` or `&&String`)."##,
},
LintCompletion{
label: "clippy::infallible_destructuring_match",
description: r##"Checks for matches being used to destructure a single-variant enum\nor tuple struct where a `let` will suffice."##,
},
LintCompletion{
label: "clippy::infinite_iter",
description: r##"Checks for iteration that is guaranteed to be infinite."##,
},
LintCompletion{
label: "clippy::inherent_to_string",
description: r##"Checks for the definition of inherent methods with a signature of `to_string(&self) -> String`."##,
description: r##"Checks for the definition of inherent methods with a signature of `to_string(&self) -> String` and if the type implementing this method also implements the `Display` trait."##,
},
LintCompletion{
label: "clippy::inline_always",
description: r##"Checks for items annotated with `#[inline(always)]`,\nunless the annotated function is empty or simply panics."##,
},
LintCompletion{
label: "clippy::inline_asm_x86_att_syntax",
description: r##"Checks for usage of AT&T x86 assembly syntax."##,
},
LintCompletion{
label: "clippy::inline_asm_x86_intel_syntax",
description: r##"Checks for usage of Intel x86 assembly syntax."##,
},
LintCompletion{
label: "clippy::inline_fn_without_body",
description: r##"Checks for `#[inline]` on trait methods without bodies"##,
},
LintCompletion{
label: "clippy::inspect_for_each",
description: r##"Checks for usage of `inspect().for_each()`."##,
},
LintCompletion{
label: "clippy::int_plus_one",
description: r##"Checks for usage of `x >= y + 1` or `x - 1 >= y` (and `<=`) in a block"##,
},
LintCompletion{
label: "clippy::integer_arithmetic",
description: r##"Checks for integer arithmetic operations which could overflow or panic.\n\nSpecifically, checks for any operators (`+`, `-`, `*`, `<<`, etc) which are capable\nof overflowing according to the [Rust\nReference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow),\nor which can panic (`/`, `%`). No bounds analysis or sophisticated reasoning is\nattempted."##,
},
LintCompletion{
label: "clippy::integer_division",
description: r##"Checks for division of integers"##,
},
LintCompletion{
label: "clippy::into_iter_on_array",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::into_iter_on_ref",
description: r##"Checks for `into_iter` calls on references which should be replaced by `iter`\nor `iter_mut`."##,
},
LintCompletion{
label: "clippy::invalid_atomic_ordering",
description: r##"Checks for usage of invalid atomic\nordering in atomic loads/stores/exchanges/updates and\nmemory fences."##,
},
LintCompletion{
label: "clippy::invalid_ref",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::invalid_regex",
description: r##"Checks [regex](https://crates.io/crates/regex) creation\n(with `Regex::new`, `RegexBuilder::new`, or `RegexSet::new`) for correct\nregex syntax."##,
},
LintCompletion{
label: "clippy::invalid_upcast_comparisons",
description: r##"Checks for comparisons where the relation is always either\ntrue or false, but where one side has been upcast so that the comparison is\nnecessary. Only integer types are checked."##,
},
LintCompletion{
label: "clippy::invisible_characters",
description: r##"Checks for invisible Unicode characters in the code."##,
},
LintCompletion{
label: "clippy::items_after_statements",
description: r##"Checks for items declared after some statement in a block."##,
},
LintCompletion{
label: "clippy::iter_cloned_collect",
description: r##"Checks for the use of `.cloned().collect()` on slice to\ncreate a `Vec`."##,
},
LintCompletion{
label: "clippy::iter_next_loop",
description: r##"Checks for loops on `x.next()`."##,
},
LintCompletion{
label: "clippy::iter_next_slice",
description: r##"Checks for usage of `iter().next()` on a Slice or an Array"##,
},
LintCompletion{
label: "clippy::iter_nth",
description: r##"Checks for use of `.iter().nth()` (and the related\n`.iter_mut().nth()`) on standard library types with O(1) element access."##,
},
LintCompletion{
label: "clippy::iter_nth_zero",
description: r##"Checks for the use of `iter.nth(0)`."##,
},
LintCompletion{
label: "clippy::iter_skip_next",
description: r##"Checks for use of `.skip(x).next()` on iterators."##,
},
LintCompletion{
label: "clippy::iterator_step_by_zero",
description: r##"Checks for calling `.step_by(0)` on iterators which panics."##,
},
LintCompletion{
label: "clippy::just_underscores_and_digits",
description: r##"Checks if you have variables whose name consists of just\nunderscores and digits."##,
},
LintCompletion{
label: "clippy::large_const_arrays",
description: r##"Checks for large `const` arrays that should\nbe defined as `static` instead."##,
},
LintCompletion{
label: "clippy::large_digit_groups",
description: r##"Warns if the digits of an integral or floating-point\nconstant are grouped into groups that\nare too large."##,
},
LintCompletion{
label: "clippy::large_enum_variant",
description: r##"Checks for large size differences between variants on\n`enum`s."##,
},
LintCompletion{
label: "clippy::large_stack_arrays",
description: r##"Checks for local arrays that may be too large."##,
},
LintCompletion{
label: "clippy::large_types_passed_by_value",
description: r##"Checks for functions taking arguments by value, where\nthe argument type is `Copy` and large enough to be worth considering\npassing by reference. Does not trigger if the function is being exported,\nbecause that might induce API breakage, if the parameter is declared as mutable,\nor if the argument is a `self`."##,
},
LintCompletion{
label: "clippy::len_without_is_empty",
description: r##"Checks for items that implement `.len()` but not\n`.is_empty()`."##,
},
LintCompletion{
label: "clippy::len_zero",
description: r##"Checks for getting the length of something via `.len()`\njust to compare to zero, and suggests using `.is_empty()` where applicable."##,
},
LintCompletion{
label: "clippy::let_and_return",
description: r##"Checks for `let`-bindings, which are subsequently\nreturned."##,
},
LintCompletion{
label: "clippy::let_underscore_drop",
description: r##"Checks for `let _ = <expr>`\nwhere expr has a type that implements `Drop`"##,
},
LintCompletion{
label: "clippy::let_underscore_lock",
description: r##"Checks for `let _ = sync_lock`"##,
},
LintCompletion{
label: "clippy::let_underscore_must_use",
description: r##"Checks for `let _ = <expr>`\nwhere expr is #[must_use]"##,
},
LintCompletion{
label: "clippy::let_unit_value",
description: r##"Checks for binding a unit value."##,
},
LintCompletion{
label: "clippy::linkedlist",
description: r##"Checks for usage of any `LinkedList`, suggesting to use a\n`Vec` or a `VecDeque` (formerly called `RingBuf`)."##,
},
LintCompletion{
label: "clippy::logic_bug",
description: r##"Checks for boolean expressions that contain terminals that\ncan be eliminated."##,
},
LintCompletion{
label: "clippy::lossy_float_literal",
description: r##"Checks for whole number float literals that\ncannot be represented as the underlying type without loss."##,
},
LintCompletion{
label: "clippy::macro_use_imports",
description: r##"Checks for `#[macro_use] use...`."##,
},
LintCompletion{
label: "clippy::main_recursion",
description: r##"Checks for recursion using the entrypoint."##,
},
LintCompletion{
label: "clippy::manual_async_fn",
description: r##"It checks for manual implementations of `async` functions."##,
},
LintCompletion{
label: "clippy::manual_filter_map",
description: r##"Checks for usage of `_.filter(_).map(_)` that can be written more simply\nas `filter_map(_)`."##,
},
LintCompletion{
label: "clippy::manual_find_map",
description: r##"Checks for usage of `_.find(_).map(_)` that can be written more simply\nas `find_map(_)`."##,
},
LintCompletion{
label: "clippy::manual_flatten",
description: r##"Check for unnecessary `if let` usage in a for loop\nwhere only the `Some` or `Ok` variant of the iterator element is used."##,
},
LintCompletion{
label: "clippy::manual_map",
description: r##"Checks for usages of `match` which could be implemented using `map`"##,
},
LintCompletion{
label: "clippy::manual_memcpy",
description: r##"Checks for for-loops that manually copy items between\nslices that could be optimized by having a memcpy."##,
},
LintCompletion{
label: "clippy::manual_non_exhaustive",
description: r##"Checks for manual implementations of the non-exhaustive pattern."##,
},
LintCompletion{
label: "clippy::manual_ok_or",
description: r##"Finds patterns that reimplement `Option::ok_or`."##,
},
LintCompletion{
label: "clippy::manual_range_contains",
description: r##"Checks for expressions like `x >= 3 && x < 8` that could\nbe more readably expressed as `(3..8).contains(x)`."##,
},
LintCompletion{
label: "clippy::manual_saturating_arithmetic",
description: r##"Checks for `.checked_add/sub(x).unwrap_or(MAX/MIN)`."##,
},
LintCompletion{
label: "clippy::manual_strip",
description: r##"Suggests using `strip_{prefix,suffix}` over `str::{starts,ends}_with` and slicing using\nthe pattern's length."##,
},
LintCompletion{
label: "clippy::manual_swap",
description: r##"Checks for manual swapping."##,
},
LintCompletion{
label: "clippy::manual_unwrap_or",
description: r##"Finds patterns that reimplement `Option::unwrap_or` or `Result::unwrap_or`."##,
},
LintCompletion{
label: "clippy::many_single_char_names",
description: r##"Checks for too many variables whose name consists of a\nsingle character."##,
},
LintCompletion{
label: "clippy::map_clone",
description: r##"Checks for usage of `map(|x| x.clone())` or\ndereferencing closures for `Copy` types, on `Iterator` or `Option`,\nand suggests `cloned()` or `copied()` instead"##,
},
LintCompletion{
label: "clippy::map_collect_result_unit",
description: r##"Checks for usage of `_.map(_).collect::<Result<(), _>()`."##,
},
LintCompletion{
label: "clippy::map_entry",
description: r##"Checks for uses of `contains_key` + `insert` on `HashMap`\nor `BTreeMap`."##,
},
LintCompletion{
label: "clippy::map_err_ignore",
description: r##"Checks for instances of `map_err(|_| Some::Enum)`"##,
},
LintCompletion{
label: "clippy::map_flatten",
description: r##"Checks for usage of `_.map(_).flatten(_)`,"##,
},
LintCompletion{
label: "clippy::map_identity",
description: r##"Checks for instances of `map(f)` where `f` is the identity function."##,
},
LintCompletion{
label: "clippy::map_unwrap_or",
description: r##"Checks for usage of `option.map(_).unwrap_or(_)` or `option.map(_).unwrap_or_else(_)` or\n`result.map(_).unwrap_or_else(_)`."##,
},
LintCompletion{
label: "clippy::match_as_ref",
description: r##"Checks for match which is used to add a reference to an\n`Option` value."##,
},
LintCompletion{
label: "clippy::match_bool",
description: r##"Checks for matches where match expression is a `bool`. It\nsuggests to replace the expression with an `if...else` block."##,
},
LintCompletion{
label: "clippy::match_like_matches_macro",
description: r##"Checks for `match` or `if let` expressions producing a\n`bool` that could be written using `matches!`"##,
},
LintCompletion{
label: "clippy::match_on_vec_items",
description: r##"Checks for `match vec[idx]` or `match vec[n..m]`."##,
},
LintCompletion{
label: "clippy::match_overlapping_arm",
description: r##"Checks for overlapping match arms."##,
},
LintCompletion{
label: "clippy::match_ref_pats",
description: r##"Checks for matches where all arms match a reference,\nsuggesting to remove the reference and deref the matched expression\ninstead. It also checks for `if let &foo = bar` blocks."##,
},
LintCompletion{
label: "clippy::match_same_arms",
description: r##"Checks for `match` with identical arm bodies."##,
},
LintCompletion{
label: "clippy::match_single_binding",
description: r##"Checks for useless match that binds to only one value."##,
},
LintCompletion{
label: "clippy::match_wild_err_arm",
description: r##"Checks for arm which matches all errors with `Err(_)`\nand take drastic actions like `panic!`."##,
description: r##"Checks for wildcard enum matches for a single variant."##,
},
LintCompletion{
label: "clippy::maybe_infinite_iter",
description: r##"Checks for iteration that may be infinite."##,
},
LintCompletion{
label: "clippy::mem_discriminant_non_enum",
description: r##"Checks for calls of `mem::discriminant()` on a non-enum type."##,
},
LintCompletion{
label: "clippy::mem_forget",
description: r##"Checks for usage of `std::mem::forget(t)` where `t` is\n`Drop`."##,
},
LintCompletion{
label: "clippy::mem_replace_option_with_none",
description: r##"Checks for `mem::replace()` on an `Option` with\n`None`."##,
},
LintCompletion{
label: "clippy::mem_replace_with_default",
description: r##"Checks for `std::mem::replace` on a value of type\n`T` with `T::default()`."##,
},
LintCompletion{
label: "clippy::mem_replace_with_uninit",
description: r##"Checks for `mem::replace(&mut _, mem::uninitialized())`\nand `mem::replace(&mut _, mem::zeroed())`."##,
},
LintCompletion{
label: "clippy::min_max",
description: r##"Checks for expressions where `std::cmp::min` and `max` are\nused to clamp values, but switched so that the result is constant."##,
},
LintCompletion{
label: "clippy::misaligned_transmute",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::mismatched_target_os",
description: r##"Checks for cfg attributes having operating systems used in target family position."##,
},
LintCompletion{
label: "clippy::misrefactored_assign_op",
description: r##"Checks for `a op= a op b` or `a op= b op a` patterns."##,
},
LintCompletion{
label: "clippy::missing_const_for_fn",
description: r##"Suggests the use of `const` in functions and methods where possible."##,
},
LintCompletion{
label: "clippy::missing_docs_in_private_items",
description: r##"Warns if there is missing doc for any documentable item\n(public or private)."##,
},
LintCompletion{
label: "clippy::missing_errors_doc",
description: r##"Checks the doc comments of publicly visible functions that\nreturn a `Result` type and warns if there is no `# Errors` section."##,
},
LintCompletion{
label: "clippy::missing_inline_in_public_items",
description: r##"it lints if an exported function, method, trait method with default impl,\nor trait method impl is not `#[inline]`."##,
},
LintCompletion{
label: "clippy::missing_panics_doc",
description: r##"Checks the doc comments of publicly visible functions that\nmay panic and warns if there is no `# Panics` section."##,
},
LintCompletion{
label: "clippy::missing_safety_doc",
description: r##"Checks for the doc comments of publicly visible\nunsafe functions and warns if there is no `# Safety` section."##,
},
LintCompletion{
label: "clippy::mistyped_literal_suffixes",
description: r##"Warns for mistyped suffix in literals"##,
},
LintCompletion{
label: "clippy::mixed_case_hex_literals",
description: r##"Warns on hexadecimal literals with mixed-case letter\ndigits."##,
},
LintCompletion{
label: "clippy::module_inception",
description: r##"Checks for modules that have the same name as their\nparent module"##,
},
LintCompletion{
label: "clippy::module_name_repetitions",
description: r##"Detects type names that are prefixed or suffixed by the\ncontaining module's name."##,
},
LintCompletion{
label: "clippy::modulo_arithmetic",
description: r##"Checks for modulo arithmetic."##,
},
LintCompletion{
label: "clippy::modulo_one",
description: r##"Checks for getting the remainder of a division by one or minus\none."##,
},
LintCompletion{
label: "clippy::multiple_crate_versions",
description: r##"Checks to see if multiple versions of a crate are being\nused."##,
},
LintCompletion{
label: "clippy::multiple_inherent_impl",
description: r##"Checks for multiple inherent implementations of a struct"##,
},
LintCompletion{
label: "clippy::must_use_candidate",
description: r##"Checks for public functions that have no\n[`#[must_use]`] attribute, but return something not already marked\nmust-use, have no mutable arg and mutate no statics.\n\n[`#[must_use]`]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute"##,
},
LintCompletion{
label: "clippy::must_use_unit",
description: r##"Checks for a [`#[must_use]`] attribute on\nunit-returning functions and methods.\n\n[`#[must_use]`]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute"##,
},
LintCompletion{
label: "clippy::mut_from_ref",
description: r##"This lint checks for functions that take immutable\nreferences and return mutable ones."##,
},
LintCompletion{
label: "clippy::mut_mut",
description: r##"Checks for instances of `mut mut` references."##,
},
LintCompletion{
label: "clippy::mut_mutex_lock",
description: r##"Checks for `&mut Mutex::lock` calls"##,
},
LintCompletion{
label: "clippy::mut_range_bound",
description: r##"Checks for loops which have a range bound that is a mutable variable"##,
},
LintCompletion{
label: "clippy::mutable_key_type",
description: r##"Checks for sets/maps with mutable key types."##,
},
LintCompletion{
label: "clippy::mutex_atomic",
description: r##"Checks for usages of `Mutex<X>` where an atomic will do."##,
},
LintCompletion{
label: "clippy::mutex_integer",
description: r##"Checks for usages of `Mutex<X>` where `X` is an integral\ntype."##,
},
LintCompletion{
label: "clippy::naive_bytecount",
description: r##"Checks for naive byte counts"##,
},
LintCompletion{
label: "clippy::needless_arbitrary_self_type",
description: r##"The lint checks for `self` in fn parameters that\nspecify the `Self`-type explicitly"##,
},
LintCompletion{
label: "clippy::needless_bool",
description: r##"Checks for expressions of the form `if c { true } else {\nfalse }` (or vice versa) and suggests using the condition directly."##,
},
LintCompletion{
label: "clippy::needless_borrow",
description: r##"Checks for address of operations (`&`) that are going to\nbe dereferenced immediately by the compiler."##,
},
LintCompletion{
label: "clippy::needless_borrowed_reference",
description: r##"Checks for useless borrowed references."##,
},
LintCompletion{
label: "clippy::needless_collect",
description: r##"Checks for functions collecting an iterator when collect\nis not needed."##,
},
LintCompletion{
label: "clippy::needless_continue",
description: r##"The lint checks for `if`-statements appearing in loops\nthat contain a `continue` statement in either their main blocks or their\n`else`-blocks, when omitting the `else`-block possibly with some\nrearrangement of code can make the code easier to understand."##,
},
LintCompletion{
label: "clippy::needless_doctest_main",
description: r##"Checks for `fn main() { .. }` in doctests"##,
},
LintCompletion{
label: "clippy::needless_lifetimes",
description: r##"Checks for lifetime annotations which can be removed by\nrelying on lifetime elision."##,
},
LintCompletion{
label: "clippy::needless_pass_by_value",
description: r##"Checks for functions taking arguments by value, but not\nconsuming them in its\nbody."##,
},
LintCompletion{
label: "clippy::needless_question_mark",
description: r##"Suggests alternatives for useless applications of `?` in terminating expressions"##,
},
LintCompletion{
label: "clippy::needless_range_loop",
description: r##"Checks for looping over the range of `0..len` of some\ncollection just to get the values by index."##,
},
LintCompletion{
label: "clippy::needless_return",
description: r##"Checks for return statements at the end of a block."##,
},
LintCompletion{
label: "clippy::needless_update",
description: r##"Checks for needlessly including a base struct on update\nwhen all fields are changed anyway.\n\nThis lint is not applied to structs marked with\n[non_exhaustive](https://doc.rust-lang.org/reference/attributes/type_system.html)."##,
},
LintCompletion{
label: "clippy::neg_cmp_op_on_partial_ord",
description: r##"Checks for the usage of negated comparison operators on types which only implement\n`PartialOrd` (e.g., `f64`)."##,
},
LintCompletion{
label: "clippy::neg_multiply",
description: r##"Checks for multiplication by -1 as a form of negation."##,
},
LintCompletion{
label: "clippy::never_loop",
description: r##"Checks for loops that will always `break`, `return` or\n`continue` an outer loop."##,
},
LintCompletion{
label: "clippy::new_ret_no_self",
description: r##"Checks for `new` not returning a type that contains `Self`."##,
},
LintCompletion{
label: "clippy::new_without_default",
description: r##"Checks for types with a `fn new() -> Self` method and no\nimplementation of\n[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html)."##,
},
LintCompletion{
label: "clippy::no_effect",
description: r##"Checks for statements which have no effect."##,
},
LintCompletion{
label: "clippy::non_ascii_literal",
description: r##"Checks for non-ASCII characters in string literals."##,
},
LintCompletion{
label: "clippy::nonminimal_bool",
description: r##"Checks for boolean expressions that can be written more\nconcisely."##,
},
LintCompletion{
label: "clippy::nonsensical_open_options",
description: r##"Checks for duplicate open options as well as combinations\nthat make no sense."##,
},
LintCompletion{
label: "clippy::not_unsafe_ptr_arg_deref",
description: r##"Checks for public functions that dereference raw pointer\narguments but are not marked unsafe."##,
},
LintCompletion{
label: "clippy::ok_expect",
description: r##"Checks for usage of `ok().expect(..)`."##,
},
LintCompletion{
label: "clippy::op_ref",
description: r##"Checks for arguments to `==` which have their address\ntaken to satisfy a bound\nand suggests to dereference the other argument instead"##,
},
LintCompletion{
label: "clippy::option_as_ref_deref",
description: r##"Checks for usage of `_.as_ref().map(Deref::deref)` or it's aliases (such as String::as_str)."##,
},
LintCompletion{
label: "clippy::option_env_unwrap",
description: r##"Checks for usage of `option_env!(...).unwrap()` and\nsuggests usage of the `env!` macro."##,
},
LintCompletion{
label: "clippy::option_if_let_else",
description: r##"Lints usage of `if let Some(v) = ... { y } else { x }` which is more\nidiomatically done with `Option::map_or` (if the else bit is a pure\nexpression) or `Option::map_or_else` (if the else bit is an impure\nexpression)."##,
},
LintCompletion{
label: "clippy::option_map_or_none",
description: r##"Checks for usage of `_.map_or(None, _)`."##,
},
LintCompletion{
label: "clippy::option_map_unit_fn",
description: r##"Checks for usage of `option.map(f)` where f is a function\nor closure that returns the unit type `()`."##,
},
LintCompletion{
label: "clippy::option_option",
description: r##"Checks for use of `Option<Option<_>>` in function signatures and type\ndefinitions"##,
},
LintCompletion{
label: "clippy::or_fun_call",
description: r##"Checks for calls to `.or(foo(..))`, `.unwrap_or(foo(..))`,\netc., and suggests to use `or_else`, `unwrap_or_else`, etc., or\n`unwrap_or_default` instead."##,
},
LintCompletion{
label: "clippy::out_of_bounds_indexing",
description: r##"Checks for out of bounds array indexing with a constant\nindex."##,
LintCompletion{label: "clippy::panic",description: r##"Checks for usage of `panic!`."##},
LintCompletion{
label: "clippy::panic_in_result_fn",
description: r##"Checks for usage of `panic!`, `unimplemented!`, `todo!`, `unreachable!` or assertions in a function of type result."##,
},
LintCompletion{
label: "clippy::panic_params",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::panicking_unwrap",
description: r##"Checks for calls of `unwrap[_err]()` that will always fail."##,
},
LintCompletion{
label: "clippy::partialeq_ne_impl",
description: r##"Checks for manual re-implementations of `PartialEq::ne`."##,
},
LintCompletion{
label: "clippy::path_buf_push_overwrite",
description: r##"* Checks for [push](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.push)\ncalls on `PathBuf` that can cause overwrites."##,
},
LintCompletion{
label: "clippy::pattern_type_mismatch",
description: r##"Checks for patterns that aren't exact representations of the types\nthey are applied to.\n\nTo satisfy this lint, you will have to adjust either the expression that is matched\nagainst or the pattern itself, as well as the bindings that are introduced by the\nadjusted patterns. For matching you will have to either dereference the expression\nwith the `*` operator, or amend the patterns to explicitly match against `&<pattern>`\nor `&mut <pattern>` depending on the reference mutability. For the bindings you need\nto use the inverse. You can leave them as plain bindings if you wish for the value\nto be copied, but you must use `ref mut <variable>` or `ref <variable>` to construct\na reference into the matched structure.\n\nIf you are looking for a way to learn about ownership semantics in more detail, it\nis recommended to look at IDE options available to you to highlight types, lifetimes\nand reference semantics in your code. The available tooling would expose these things\nin a general way even outside of the various pattern matching mechanics. Of course\nthis lint can still be used to highlight areas of interest and ensure a good understanding\nof ownership semantics."##,
},
LintCompletion{
label: "clippy::possible_missing_comma",
description: r##"Checks for possible missing comma in an array. It lints if\nan array element is a binary operator expression and it lies on two lines."##,
},
LintCompletion{
label: "clippy::precedence",
description: r##"Checks for operations where precedence may be unclear\nand suggests to add parentheses. Currently it catches the following:\n* mixed usage of arithmetic and bit shifting/combining operators without\nparentheses\n* a \"negative\" numeric literal (which is really a unary `-` followed by a\nnumeric literal)\n followed by a method call"##,
},
LintCompletion{
label: "clippy::print_literal",
description: r##"This lint warns about the use of literals as `print!`/`println!` args."##,
},
LintCompletion{
label: "clippy::print_stderr",
description: r##"Checks for printing on *stderr*. The purpose of this lint\nis to catch debugging remnants."##,
},
LintCompletion{
label: "clippy::print_stdout",
description: r##"Checks for printing on *stdout*. The purpose of this lint\nis to catch debugging remnants."##,
},
LintCompletion{
label: "clippy::print_with_newline",
description: r##"This lint warns when you use `print!()` with a format\nstring that ends in a newline."##,
},
LintCompletion{
label: "clippy::println_empty_string",
description: r##"This lint warns when you use `println!(\"\")` to\nprint a newline."##,
},
LintCompletion{
label: "clippy::ptr_arg",
description: r##"This lint checks for function arguments of type `&String`\nor `&Vec` unless the references are mutable. It will also suggest you\nreplace `.clone()` calls with the appropriate `.to_owned()`/`to_string()`\ncalls."##,
},
LintCompletion{
label: "clippy::ptr_as_ptr",
description: r##"Checks for `as` casts between raw pointers without changing its mutability,\nnamely `*const T` to `*const U` and `*mut T` to `*mut U`."##,
},
LintCompletion{
label: "clippy::ptr_eq",
description: r##"Use `std::ptr::eq` when applicable"##,
},
LintCompletion{
label: "clippy::ptr_offset_with_cast",
description: r##"Checks for usage of the `offset` pointer method with a `usize` casted to an\n`isize`."##,
},
LintCompletion{
label: "clippy::pub_enum_variant_names",
description: r##"Detects public enumeration variants that are\nprefixed or suffixed by the same characters."##,
},
LintCompletion{
label: "clippy::question_mark",
description: r##"Checks for expressions that could be replaced by the question mark operator."##,
},
LintCompletion{
label: "clippy::range_minus_one",
description: r##"Checks for inclusive ranges where 1 is subtracted from\nthe upper bound, e.g., `x..=(y-1)`."##,
},
LintCompletion{
label: "clippy::range_plus_one",
description: r##"Checks for exclusive ranges where 1 is added to the\nupper bound, e.g., `x..(y+1)`."##,
},
LintCompletion{
label: "clippy::range_step_by_zero",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::range_zip_with_len",
description: r##"Checks for zipping a collection with the range of\n`0.._.len()`."##,
},
LintCompletion{
label: "clippy::rc_buffer",
description: r##"Checks for `Rc<T>` and `Arc<T>` when `T` is a mutable buffer type such as `String` or `Vec`."##,
},
LintCompletion{
label: "clippy::redundant_allocation",
description: r##"Checks for use of redundant allocations anywhere in the code."##,
},
LintCompletion{
label: "clippy::redundant_clone",
description: r##"Checks for a redundant `clone()` (and its relatives) which clones an owned\nvalue that is going to be dropped without further use."##,
},
LintCompletion{
label: "clippy::redundant_closure",
description: r##"Checks for closures which just call another function where\nthe function can be called directly. `unsafe` functions or calls where types\nget adjusted are ignored."##,
},
LintCompletion{
label: "clippy::redundant_closure_call",
description: r##"Detects closures called in the same expression where they\nare defined."##,
description: r##"Checks for closures which only invoke a method on the closure\nargument and can be replaced by referencing the method directly."##,
},
LintCompletion{
label: "clippy::redundant_else",
description: r##"Checks for `else` blocks that can be removed without changing semantics."##,
},
LintCompletion{
label: "clippy::redundant_field_names",
description: r##"Checks for fields in struct literals where shorthands\ncould be used."##,
},
LintCompletion{
label: "clippy::redundant_pattern",
description: r##"Checks for patterns in the form `name @ _`."##,
},
LintCompletion{
label: "clippy::redundant_pattern_matching",
description: r##"Lint for redundant pattern matching over `Result`, `Option`,\n`std::task::Poll` or `std::net::IpAddr`"##,
},
LintCompletion{
label: "clippy::redundant_pub_crate",
description: r##"Checks for items declared `pub(crate)` that are not crate visible because they\nare inside a private module."##,
},
LintCompletion{
label: "clippy::redundant_slicing",
description: r##"Checks for redundant slicing expressions which use the full range, and\ndo not change the type."##,
},
LintCompletion{
label: "clippy::redundant_static_lifetimes",
description: r##"Checks for constants and statics with an explicit `'static` lifetime."##,
},
LintCompletion{
label: "clippy::ref_in_deref",
description: r##"Checks for references in expressions that use\nauto dereference."##,
},
LintCompletion{
label: "clippy::ref_option_ref",
description: r##"Checks for usage of `&Option<&T>`."##,
},
LintCompletion{
label: "clippy::regex_macro",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::repeat_once",
description: r##"Checks for usage of `.repeat(1)` and suggest the following method for each types.\n- `.to_string()` for `str`\n- `.clone()` for `String`\n- `.to_vec()` for `slice`"##,
},
LintCompletion{
label: "clippy::replace_consts",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::rest_pat_in_fully_bound_structs",
description: r##"Checks for unnecessary '..' pattern binding on struct when all fields are explicitly matched."##,
},
LintCompletion{
label: "clippy::result_map_or_into_option",
description: r##"Checks for usage of `_.map_or(None, Some)`."##,
},
LintCompletion{
label: "clippy::result_map_unit_fn",
description: r##"Checks for usage of `result.map(f)` where f is a function\nor closure that returns the unit type `()`."##,
},
LintCompletion{
label: "clippy::result_unit_err",
description: r##"Checks for public functions that return a `Result`\nwith an `Err` type of `()`. It suggests using a custom type that\nimplements [`std::error::Error`]."##,
},
LintCompletion{
label: "clippy::reversed_empty_ranges",
description: r##"Checks for range expressions `x..y` where both `x` and `y`\nare constant and `x` is greater or equal to `y`."##,
},
LintCompletion{
label: "clippy::same_functions_in_if_condition",
description: r##"Checks for consecutive `if`s with the same function call."##,
},
LintCompletion{
label: "clippy::same_item_push",
description: r##"Checks whether a for loop is being used to push a constant\nvalue into a Vec."##,
},
LintCompletion{
label: "clippy::search_is_some",
description: r##"Checks for an iterator or string search (such as `find()`,\n`position()`, or `rposition()`) followed by a call to `is_some()`."##,
},
LintCompletion{
label: "clippy::self_assignment",
description: r##"Checks for explicit self-assignments."##,
},
LintCompletion{
label: "clippy::semicolon_if_nothing_returned",
description: r##"Looks for blocks of expressions and fires if the last expression returns `()`\nbut is not followed by a semicolon."##,
},
LintCompletion{
label: "clippy::serde_api_misuse",
description: r##"Checks for mis-uses of the serde API."##,
},
LintCompletion{
label: "clippy::shadow_reuse",
description: r##"Checks for bindings that shadow other bindings already in\nscope, while reusing the original value."##,
},
LintCompletion{
label: "clippy::shadow_same",
description: r##"Checks for bindings that shadow other bindings already in\nscope, while just changing reference level or mutability."##,
},
LintCompletion{
label: "clippy::shadow_unrelated",
description: r##"Checks for bindings that shadow other bindings already in\nscope, either without a initialization or with one that does not even use\nthe original value."##,
},
LintCompletion{
label: "clippy::short_circuit_statement",
description: r##"Checks for the use of short circuit boolean conditions as\na\nstatement."##,
},
LintCompletion{
label: "clippy::should_assert_eq",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::should_implement_trait",
description: r##"Checks for methods that should live in a trait\nimplementation of a `std` trait (see [llogiq's blog\npost](http://llogiq.github.io/2015/07/30/traits.html) for further\ninformation) instead of an inherent implementation."##,
},
LintCompletion{
label: "clippy::similar_names",
description: r##"Checks for names that are very similar and thus confusing."##,
},
LintCompletion{
label: "clippy::single_char_add_str",
description: r##"Warns when using `push_str`/`insert_str` with a single-character string literal\nwhere `push`/`insert` with a `char` would work fine."##,
},
LintCompletion{
label: "clippy::single_char_pattern",
description: r##"Checks for string methods that receive a single-character\n`str` as an argument, e.g., `_.split(\"x\")`."##,
},
LintCompletion{
label: "clippy::single_component_path_imports",
description: r##"Checking for imports with single component use path."##,
},
LintCompletion{
label: "clippy::single_element_loop",
description: r##"Checks whether a for loop has a single element."##,
},
LintCompletion{
label: "clippy::single_match",
description: r##"Checks for matches with a single arm where an `if let`\nwill usually suffice."##,
},
LintCompletion{
label: "clippy::single_match_else",
description: r##"Checks for matches with two arms where an `if let else` will\nusually suffice."##,
},
LintCompletion{
label: "clippy::size_of_in_element_count",
description: r##"Detects expressions where\n`size_of::<T>` or `size_of_val::<T>` is used as a\ncount of elements of type `T`"##,
},
LintCompletion{
label: "clippy::skip_while_next",
description: r##"Checks for usage of `_.skip_while(condition).next()`."##,
description: r##"When sorting primitive values (integers, bools, chars, as well\nas arrays, slices, and tuples of such items), it is better to\nuse an unstable sort than a stable sort."##,
},
LintCompletion{
label: "clippy::str_to_string",
description: r##"This lint checks for `.to_string()` method calls on values of type `&str`."##,
},
LintCompletion{
label: "clippy::string_add",
description: r##"Checks for all instances of `x + _` where `x` is of type\n`String`, but only if [`string_add_assign`](#string_add_assign) does *not*\nmatch."##,
},
LintCompletion{
label: "clippy::string_add_assign",
description: r##"Checks for string appends of the form `x = x + y` (without\n`let`!)."##,
},
LintCompletion{
label: "clippy::string_extend_chars",
description: r##"Checks for the use of `.extend(s.chars())` where s is a\n`&str` or `String`."##,
},
LintCompletion{
label: "clippy::string_from_utf8_as_bytes",
description: r##"Check if the string is transformed to byte array and casted back to string."##,
},
LintCompletion{
label: "clippy::string_lit_as_bytes",
description: r##"Checks for the `as_bytes` method called on string literals\nthat contain only ASCII characters."##,
},
LintCompletion{
label: "clippy::string_to_string",
description: r##"This lint checks for `.to_string()` method calls on values of type `String`."##,
},
LintCompletion{
label: "clippy::struct_excessive_bools",
description: r##"Checks for excessive\nuse of bools in structs."##,
},
LintCompletion{
label: "clippy::suboptimal_flops",
description: r##"Looks for floating-point expressions that\ncan be expressed using built-in methods to improve both\naccuracy and performance."##,
},
LintCompletion{
label: "clippy::suspicious_arithmetic_impl",
description: r##"Lints for suspicious operations in impls of arithmetic operators, e.g.\nsubtracting elements in an Add impl."##,
description: r##"Checks for use of the non-existent `=*`, `=!` and `=-`\noperators."##,
},
LintCompletion{
label: "clippy::suspicious_else_formatting",
description: r##"Checks for formatting of `else`. It lints if the `else`\nis followed immediately by a newline or the `else` seems to be missing."##,
},
LintCompletion{
label: "clippy::suspicious_map",
description: r##"Checks for calls to `map` followed by a `count`."##,
},
LintCompletion{
label: "clippy::suspicious_op_assign_impl",
description: r##"Lints for suspicious operations in impls of OpAssign, e.g.\nsubtracting elements in an AddAssign impl."##,
},
LintCompletion{
label: "clippy::suspicious_operation_groupings",
description: r##"Checks for unlikely usages of binary operators that are almost\ncertainly typos and/or copy/paste errors, given the other usages\nof binary operators nearby."##,
},
LintCompletion{
label: "clippy::suspicious_unary_op_formatting",
description: r##"Checks the formatting of a unary operator on the right hand side\nof a binary operator. It lints if there is no space between the binary and unary operators,\nbut there is a space between the unary and its operand."##,
},
LintCompletion{
label: "clippy::tabs_in_doc_comments",
description: r##"Checks doc comments for usage of tab characters."##,
},
LintCompletion{
label: "clippy::temporary_assignment",
description: r##"Checks for construction of a structure or tuple just to\nassign a value in it."##,
},
LintCompletion{
label: "clippy::temporary_cstring_as_ptr",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::to_digit_is_some",
description: r##"Checks for `.to_digit(..).is_some()` on `char`s."##,
},
LintCompletion{
label: "clippy::to_string_in_display",
description: r##"Checks for uses of `to_string()` in `Display` traits."##,
},
LintCompletion{label: "clippy::todo",description: r##"Checks for usage of `todo!`."##},
LintCompletion{
label: "clippy::too_many_arguments",
description: r##"Checks for functions with too many parameters."##,
},
LintCompletion{
label: "clippy::too_many_lines",
description: r##"Checks for functions with a large amount of lines."##,
},
LintCompletion{
label: "clippy::toplevel_ref_arg",
description: r##"Checks for function arguments and let bindings denoted as\n`ref`."##,
},
LintCompletion{
label: "clippy::trait_duplication_in_bounds",
description: r##"Checks for cases where generics are being used and multiple\nsyntax specifications for trait bounds are used simultaneously."##,
},
LintCompletion{
label: "clippy::transmute_bytes_to_str",
description: r##"Checks for transmutes from a `&[u8]` to a `&str`."##,
},
LintCompletion{
label: "clippy::transmute_float_to_int",
description: r##"Checks for transmutes from a float to an integer."##,
},
LintCompletion{
label: "clippy::transmute_int_to_bool",
description: r##"Checks for transmutes from an integer to a `bool`."##,
},
LintCompletion{
label: "clippy::transmute_int_to_char",
description: r##"Checks for transmutes from an integer to a `char`."##,
},
LintCompletion{
label: "clippy::transmute_int_to_float",
description: r##"Checks for transmutes from an integer to a float."##,
},
LintCompletion{
label: "clippy::transmute_ptr_to_ptr",
description: r##"Checks for transmutes from a pointer to a pointer, or\nfrom a reference to a reference."##,
},
LintCompletion{
label: "clippy::transmute_ptr_to_ref",
description: r##"Checks for transmutes from a pointer to a reference."##,
description: r##"Checks for transmutes that could be a pointer cast."##,
},
LintCompletion{
label: "clippy::transmuting_null",
description: r##"Checks for transmute calls which would receive a null pointer."##,
},
LintCompletion{
label: "clippy::trivial_regex",
description: r##"Checks for trivial [regex](https://crates.io/crates/regex)\ncreation (with `Regex::new`, `RegexBuilder::new`, or `RegexSet::new`)."##,
},
LintCompletion{
label: "clippy::trivially_copy_pass_by_ref",
description: r##"Checks for functions taking arguments by reference, where\nthe argument type is `Copy` and small enough to be more efficient to always\npass by value."##,
},
LintCompletion{
label: "clippy::try_err",
description: r##"Checks for usages of `Err(x)?`."##,
},
LintCompletion{
label: "clippy::type_complexity",
description: r##"Checks for types used in structs, parameters and `let`\ndeclarations above a certain complexity threshold."##,
},
LintCompletion{
label: "clippy::type_repetition_in_bounds",
description: r##"This lint warns about unnecessary type repetitions in trait bounds"##,
},
LintCompletion{
label: "clippy::undropped_manually_drops",
description: r##"Prevents the safe `std::mem::drop` function from being called on `std::mem::ManuallyDrop`."##,
},
LintCompletion{
label: "clippy::unicode_not_nfc",
description: r##"Checks for string literals that contain Unicode in a form\nthat is not equal to its\n[NFC-recomposition](http://www.unicode.org/reports/tr15/#Norm_Forms)."##,
},
LintCompletion{
label: "clippy::unimplemented",
description: r##"Checks for usage of `unimplemented!`."##,
},
LintCompletion{
label: "clippy::uninit_assumed_init",
description: r##"Checks for `MaybeUninit::uninit().assume_init()`."##,
},
LintCompletion{
label: "clippy::unit_arg",
description: r##"Checks for passing a unit value as an argument to a function without using a\nunit literal (`()`)."##,
},
LintCompletion{
label: "clippy::unit_cmp",
description: r##"Checks for comparisons to unit. This includes all binary\ncomparisons (like `==` and `<`) and asserts."##,
},
LintCompletion{
label: "clippy::unit_return_expecting_ord",
description: r##"Checks for functions that expect closures of type\nFn(...) -> Ord where the implemented closure returns the unit type.\nThe lint also suggests to remove the semi-colon at the end of the statement if present."##,
},
LintCompletion{
label: "clippy::unknown_clippy_lints",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::unnecessary_cast",
description: r##"Checks for casts to the same type, casts of int literals to integer types\nand casts of float literals to float types."##,
},
LintCompletion{
label: "clippy::unnecessary_filter_map",
description: r##"Checks for `filter_map` calls which could be replaced by `filter` or `map`.\nMore specifically it checks if the closure provided is only performing one of the\nfilter or map operations and suggests the appropriate option."##,
},
LintCompletion{
label: "clippy::unnecessary_fold",
description: r##"Checks for using `fold` when a more succinct alternative exists.\nSpecifically, this checks for `fold`s which could be replaced by `any`, `all`,\n`sum` or `product`."##,
},
LintCompletion{
label: "clippy::unnecessary_lazy_evaluations",
description: r##"As the counterpart to `or_fun_call`, this lint looks for unnecessary\nlazily evaluated closures on `Option` and `Result`.\n\nThis lint suggests changing the following functions, when eager evaluation results in\nsimpler code:\n - `unwrap_or_else` to `unwrap_or`\n - `and_then` to `and`\n - `or_else` to `or`\n - `get_or_insert_with` to `get_or_insert`\n - `ok_or_else` to `ok_or`"##,
},
LintCompletion{
label: "clippy::unnecessary_mut_passed",
description: r##"Detects passing a mutable reference to a function that only\nrequires an immutable reference."##,
},
LintCompletion{
label: "clippy::unnecessary_operation",
description: r##"Checks for expression statements that can be reduced to a\nsub-expression."##,
},
LintCompletion{
label: "clippy::unnecessary_sort_by",
description: r##"Detects uses of `Vec::sort_by` passing in a closure\nwhich compares the two arguments, either directly or indirectly."##,
},
LintCompletion{
label: "clippy::unnecessary_unwrap",
description: r##"Checks for calls of `unwrap[_err]()` that cannot fail."##,
},
LintCompletion{
label: "clippy::unnecessary_wraps",
description: r##"Checks for private functions that only return `Ok` or `Some`."##,
},
LintCompletion{
label: "clippy::unneeded_field_pattern",
description: r##"Checks for structure field patterns bound to wildcards."##,
},
LintCompletion{
label: "clippy::unneeded_wildcard_pattern",
description: r##"Checks for tuple patterns with a wildcard\npattern (`_`) is next to a rest pattern (`..`).\n\n_NOTE_: While `_, ..` means there is at least one element left, `..`\nmeans there are 0 or more elements left. This can make a difference\nwhen refactoring, but shouldn't result in errors in the refactored code,\nsince the wildcard pattern isn't used anyway."##,
},
LintCompletion{
label: "clippy::unnested_or_patterns",
description: r##"Checks for unnested or-patterns, e.g., `Some(0) | Some(2)` and\nsuggests replacing the pattern with a nested one, `Some(0 | 2)`.\n\nAnother way to think of this is that it rewrites patterns in\n*disjunctive normal form (DNF)* into *conjunctive normal form (CNF)*."##,
},
LintCompletion{
label: "clippy::unreachable",
description: r##"Checks for usage of `unreachable!`."##,
},
LintCompletion{
label: "clippy::unreadable_literal",
description: r##"Warns if a long integral or floating-point constant does\nnot contain underscores."##,
},
LintCompletion{
label: "clippy::unsafe_derive_deserialize",
description: r##"Checks for deriving `serde::Deserialize` on a type that\nhas methods using `unsafe`."##,
},
LintCompletion{
label: "clippy::unsafe_removed_from_name",
description: r##"Checks for imports that remove \"unsafe\" from an item's\nname."##,
},
LintCompletion{
label: "clippy::unsafe_vector_initialization",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::unseparated_literal_suffix",
description: r##"Warns if literal suffixes are not separated by an\nunderscore."##,
},
LintCompletion{
label: "clippy::unsound_collection_transmute",
description: r##"Checks for transmutes between collections whose\ntypes have different ABI, size or alignment."##,
},
LintCompletion{
label: "clippy::unstable_as_mut_slice",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::unstable_as_slice",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::unused_collect",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::unused_io_amount",
description: r##"Checks for unused written/read amount."##,
},
LintCompletion{
label: "clippy::unused_label",
description: r##"Nothing. This lint has been deprecated."##,
},
LintCompletion{
label: "clippy::unused_self",
description: r##"Checks methods that contain a `self` argument but don't use it"##,
},
LintCompletion{
label: "clippy::unused_unit",
description: r##"Checks for unit (`()`) expressions that can be removed."##,
},
LintCompletion{
label: "clippy::unusual_byte_groupings",
description: r##"Warns if hexadecimal or binary literals are not grouped\nby nibble or byte."##,
},
LintCompletion{
label: "clippy::unwrap_in_result",
description: r##"Checks for functions of type Result that contain `expect()` or `unwrap()`"##,
},
LintCompletion{
label: "clippy::unwrap_used",
description: r##"Checks for `.unwrap()` calls on `Option`s and on `Result`s."##,
},
LintCompletion{
label: "clippy::upper_case_acronyms",
description: r##"Checks for fully capitalized names and optionally names containing a capitalized acronym."##,
},
LintCompletion{
label: "clippy::use_debug",
description: r##"Checks for use of `Debug` formatting. The purpose of this\nlint is to catch debugging remnants."##,
},
LintCompletion{
label: "clippy::use_self",
description: r##"Checks for unnecessary repetition of structure name when a\nreplacement with `Self` is applicable."##,
},
LintCompletion{
label: "clippy::used_underscore_binding",
description: r##"Checks for the use of bindings with a single leading\nunderscore."##,
},
LintCompletion{
label: "clippy::useless_asref",
description: r##"Checks for usage of `.as_ref()` or `.as_mut()` where the\ntypes before and after the call are the same."##,
},
LintCompletion{
label: "clippy::useless_attribute",
description: r##"Checks for `extern crate` and `use` items annotated with\nlint attributes.\n\nThis lint permits `#[allow(unused_imports)]`, `#[allow(deprecated)]`,\n`#[allow(unreachable_pub)]`, `#[allow(clippy::wildcard_imports)]` and\n`#[allow(clippy::enum_glob_use)]` on `use` items and `#[allow(unused_imports)]` on\n`extern crate` items with a `#[macro_use]` attribute."##,
},
LintCompletion{
label: "clippy::useless_conversion",
description: r##"Checks for `Into`, `TryInto`, `From`, `TryFrom`, or `IntoIter` calls\nwhich uselessly convert to the same type."##,
},
LintCompletion{
label: "clippy::useless_format",
description: r##"Checks for the use of `format!(\"string literal with no\nargument\")` and `format!(\"{}\", foo)` where `foo` is a string."##,
},
LintCompletion{
label: "clippy::useless_let_if_seq",
description: r##"Checks for variable declarations immediately followed by a\nconditional affectation."##,
},
LintCompletion{
label: "clippy::useless_transmute",
description: r##"Checks for transmutes to the original type of the object\nand transmutes that could be a cast."##,
},
LintCompletion{
label: "clippy::useless_vec",
description: r##"Checks for usage of `&vec![..]` when using `&[..]` would\nbe possible."##,
},
LintCompletion{
label: "clippy::vec_box",
description: r##"Checks for use of `Vec<Box<T>>` where T: Sized anywhere in the code.\nCheck the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##,
},
LintCompletion{
label: "clippy::vec_init_then_push",
description: r##"Checks for calls to `push` immediately after creating a new `Vec`."##,
},
LintCompletion{
label: "clippy::vec_resize_to_zero",
description: r##"Finds occurrences of `Vec::resize(0, an_int)`"##,
},
LintCompletion{
label: "clippy::verbose_bit_mask",
description: r##"Checks for bit masks that can be replaced by a call\nto `trailing_zeros`"##,
},
LintCompletion{
label: "clippy::verbose_file_reads",
description: r##"Checks for use of File::read_to_end and File::read_to_string."##,
},
LintCompletion{
label: "clippy::vtable_address_comparisons",
description: r##"Checks for comparisons with an address of a trait vtable."##,
},
LintCompletion{
label: "clippy::while_immutable_condition",
description: r##"Checks whether variables used within while loop condition\ncan be (and are) mutated in the body."##,
},
LintCompletion{
label: "clippy::while_let_loop",
description: r##"Detects `loop + match` combinations that are easier\nwritten as a `while let` loop."##,
},
LintCompletion{
label: "clippy::while_let_on_iterator",
description: r##"Checks for `while let` expressions on iterators."##,
},
LintCompletion{
label: "clippy::wildcard_dependencies",
description: r##"Checks for wildcard dependencies in the `Cargo.toml`."##,
},
LintCompletion{
label: "clippy::wildcard_enum_match_arm",
description: r##"Checks for wildcard enum matches using `_`."##,
},
LintCompletion{
label: "clippy::wildcard_imports",
description: r##"Checks for wildcard imports `use _::*`."##,
},
LintCompletion{
label: "clippy::wildcard_in_or_patterns",
description: r##"Checks for wildcard pattern used with others patterns in same match arm."##,
},
LintCompletion{
label: "clippy::write_literal",
description: r##"This lint warns about the use of literals as `write!`/`writeln!` args."##,
},
LintCompletion{
label: "clippy::write_with_newline",
description: r##"This lint warns when you use `write!()` with a format\nstring that\nends in a newline."##,
},
LintCompletion{
label: "clippy::writeln_empty_string",
description: r##"This lint warns when you use `writeln!(buf, \"\")` to\nprint a newline."##,
},
LintCompletion{
label: "clippy::wrong_pub_self_convention",
description: r##"This is the same as\n[`wrong_self_convention`](#wrong_self_convention), but for public items."##,
},
LintCompletion{
label: "clippy::wrong_self_convention",
description: r##"Checks for methods with certain name prefixes and which\ndoesn't match how self is taken. The actual rules are:\n\n|Prefix |`self` taken |\n|-------|----------------------|\n|`as_` |`&self` or `&mut self`|\n|`from_`| none |\n|`into_`|`self` |\n|`is_` |`&self` or none |\n|`to_` |`&self` |"##,
},
LintCompletion{
label: "clippy::wrong_transmute",
description: r##"Checks for transmutes that can't ever be correct on any\narchitecture."##,
},
LintCompletion{
label: "clippy::zero_divided_by_zero",
description: r##"Checks for `0.0 / 0.0`."##,
},
LintCompletion{
label: "clippy::zero_prefixed_literal",
description: r##"Warns if an integral constant literal starts with `0`."##,
},
LintCompletion{
label: "clippy::zero_ptr",
description: r##"Catch casts from `0` to some pointer type"##,
},
LintCompletion{
label: "clippy::zero_sized_map_values",
description: r##"Checks for maps with zero-sized value types anywhere in the code."##,
},
LintCompletion{
label: "clippy::zst_offset",
description: r##"Checks for `offset(_)`, `wrapping_`{`add`, `sub`}, etc. on raw pointers to\nzero-sized types"##,