Lint {
name: "borrow_interior_mutable_const",
group: "correctness",
- desc: "referencing const with interior mutability",
+ desc: "referencing `const` with interior mutability",
deprecation: None,
module: "non_copy_const",
},
Lint {
name: "char_lit_as_u8",
group: "complexity",
- desc: "casting a character literal to u8 truncates",
+ desc: "casting a character literal to `u8` truncates",
deprecation: None,
module: "types",
},
Lint {
name: "cmp_nan",
group: "correctness",
- desc: "comparisons to NAN, which will always return false, probably not intended",
+ desc: "comparisons to `NAN`, which will always return false, probably not intended",
deprecation: None,
module: "misc",
},
Lint {
name: "declare_interior_mutable_const",
group: "correctness",
- desc: "declaring const with interior mutability",
+ desc: "declaring `const` with interior mutability",
deprecation: None,
module: "non_copy_const",
},
Lint {
name: "default_trait_access",
group: "pedantic",
- desc: "checks for literal calls to Default::default()",
+ desc: "checks for literal calls to `Default::default()`",
deprecation: None,
module: "default_trait_access",
},
Lint {
name: "else_if_without_else",
group: "restriction",
- desc: "if expression with an `else if`, but without a final `else` branch",
+ desc: "`if` expression with an `else if`, but without a final `else` branch",
deprecation: None,
module: "else_if_without_else",
},
Lint {
name: "if_same_then_else",
group: "correctness",
- desc: "if with the same *then* and *else* blocks",
+ desc: "`if` with the same `then` and `else` blocks",
deprecation: None,
module: "copies",
},
Lint {
name: "ifs_same_cond",
group: "correctness",
- desc: "consecutive `ifs` with the same condition",
+ desc: "consecutive `if`s with the same condition",
deprecation: None,
module: "copies",
},
Lint {
name: "infallible_destructuring_match",
group: "style",
- desc: "a match statement with a single infallible arm instead of a `let`",
+ desc: "a `match` statement with a single infallible arm instead of a `let`",
deprecation: None,
module: "infallible_destructuring_match",
},
Lint {
name: "inherent_to_string_shadow_display",
group: "correctness",
- desc: "type implements inherent method `to_string()`, which gets shadowed by the implementation of the `Display` trait ",
+ desc: "type implements inherent method `to_string()`, which gets shadowed by the implementation of the `Display` trait",
deprecation: None,
module: "inherent_to_string",
},
Lint {
name: "int_plus_one",
group: "complexity",
- desc: "instead of using x >= y + 1, use x > y",
+ desc: "instead of using `x >= y + 1`, use `x > y`",
deprecation: None,
module: "int_plus_one",
},
Lint {
name: "let_underscore_must_use",
group: "restriction",
- desc: "non-binding let on a #[must_use] expression",
+ desc: "non-binding let on a `#[must_use]` expression",
deprecation: None,
module: "let_underscore",
},
Lint {
name: "let_unit_value",
group: "style",
- desc: "creating a let binding to a value of unit type, which usually can\'t be used afterwards",
+ desc: "creating a `let` binding to a value of unit type, which usually can\'t be used afterwards",
deprecation: None,
module: "types",
},
Lint {
name: "linkedlist",
group: "pedantic",
- desc: "usage of LinkedList, usually a vector is faster, or a more specialized data structure like a VecDeque",
+ desc: "usage of LinkedList, usually a vector is faster, or a more specialized data structure like a `VecDeque`",
deprecation: None,
module: "types",
},
Lint {
name: "match_as_ref",
group: "complexity",
- desc: "a match on an Option value instead of using `as_ref()` or `as_mut`",
+ desc: "a `match` on an Option value instead of using `as_ref()` or `as_mut`",
deprecation: None,
module: "matches",
},
Lint {
name: "match_bool",
group: "style",
- desc: "a match on a boolean expression instead of an `if..else` block",
+ desc: "a `match` on a boolean expression instead of an `if..else` block",
deprecation: None,
module: "matches",
},
Lint {
name: "match_overlapping_arm",
group: "style",
- desc: "a match with overlapping arms",
+ desc: "a `match` with overlapping arms",
deprecation: None,
module: "matches",
},
Lint {
name: "match_ref_pats",
group: "style",
- desc: "a match or `if let` with all arms prefixed with `&` instead of deref-ing the match expression",
+ desc: "a `match` or `if let` with all arms prefixed with `&` instead of deref-ing the match expression",
deprecation: None,
module: "matches",
},
Lint {
name: "match_wild_err_arm",
group: "style",
- desc: "a match with `Err(_)` arm and take drastic actions",
+ desc: "a `match` with `Err(_)` arm and take drastic actions",
deprecation: None,
module: "matches",
},
Lint {
name: "mem_discriminant_non_enum",
group: "correctness",
- desc: "calling mem::descriminant on non-enum type",
+ desc: "calling `mem::descriminant` on non-enum type",
deprecation: None,
module: "mem_discriminant",
},
Lint {
name: "missing_inline_in_public_items",
group: "restriction",
- desc: "detects missing #[inline] attribute for public callables (functions, trait methods, methods...)",
+ desc: "detects missing `#[inline]` attribute for public callables (functions, trait methods, methods...)",
deprecation: None,
module: "missing_inline",
},
Lint {
name: "mutable_key_type",
group: "correctness",
- desc: "Check for mutable Map/Set key type",
+ desc: "Check for mutable `Map`/`Set` key type",
deprecation: None,
module: "mut_key",
},
Lint {
name: "neg_multiply",
group: "style",
- desc: "multiplying integers with -1",
+ desc: "multiplying integers with `-1`",
deprecation: None,
module: "neg_multiply",
},
Lint {
name: "option_map_unit_fn",
group: "complexity",
- desc: "using `option.map(f)`, where f is a function or closure that returns ()",
+ desc: "using `option.map(f)`, where `f` is a function or closure that returns `()`",
deprecation: None,
module: "map_unit_fn",
},
Lint {
name: "panicking_unwrap",
group: "correctness",
- desc: "checks for calls of unwrap[_err]() that will always fail",
+ desc: "checks for calls of `unwrap[_err]()` that will always fail",
deprecation: None,
module: "unwrap",
},
Lint {
name: "result_map_unit_fn",
group: "complexity",
- desc: "using `result.map(f)`, where f is a function or closure that returns ()",
+ desc: "using `result.map(f)`, where `f` is a function or closure that returns `()`",
deprecation: None,
module: "map_unit_fn",
},
Lint {
name: "same_functions_in_if_condition",
group: "pedantic",
- desc: "consecutive `ifs` with the same function call",
+ desc: "consecutive `if`s with the same function call",
deprecation: None,
module: "copies",
},
Lint {
name: "single_match",
group: "style",
- desc: "a match statement with a single nontrivial arm (i.e., where the other arm is `_ => {}`) instead of `if let`",
+ desc: "a `match` statement with a single nontrivial arm (i.e., where the other arm is `_ => {}`) instead of `if let`",
deprecation: None,
module: "matches",
},
Lint {
name: "single_match_else",
group: "pedantic",
- desc: "a match statement with two arms where the second arm\'s pattern is a placeholder instead of a specific match pattern",
+ desc: "a `match` statement with two arms where the second arm\'s pattern is a placeholder instead of a specific match pattern",
deprecation: None,
module: "matches",
},
Lint {
name: "unnecessary_unwrap",
group: "complexity",
- desc: "checks for calls of unwrap[_err]() that cannot fail",
+ desc: "checks for calls of `unwrap[_err]()` that cannot fail",
deprecation: None,
module: "unwrap",
},
Lint {
name: "zero_divided_by_zero",
group: "complexity",
- desc: "usage of `0.0 / 0.0` to obtain NaN instead of std::f32::NaN or std::f64::NaN",
+ desc: "usage of `0.0 / 0.0` to obtain NaN instead of `std::f32::NAN` or `std::f64::NAN`",
deprecation: None,
module: "zero_div_zero",
},
Lint {
name: "zero_ptr",
group: "style",
- desc: "using 0 as *{const, mut} T",
+ desc: "using `0 as *{const, mut} T`",
deprecation: None,
module: "misc",
},