Update lintlist

This commit is contained in:
Yuki Okushi 2020-01-06 16:41:15 +09:00
parent 07e33633a3
commit cd201f526f

View file

@ -87,7 +87,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "borrow_interior_mutable_const", name: "borrow_interior_mutable_const",
group: "correctness", group: "correctness",
desc: "referencing const with interior mutability", desc: "referencing `const` with interior mutability",
deprecation: None, deprecation: None,
module: "non_copy_const", module: "non_copy_const",
}, },
@ -178,7 +178,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "char_lit_as_u8", name: "char_lit_as_u8",
group: "complexity", group: "complexity",
desc: "casting a character literal to u8 truncates", desc: "casting a character literal to `u8` truncates",
deprecation: None, deprecation: None,
module: "types", module: "types",
}, },
@ -227,7 +227,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "cmp_nan", name: "cmp_nan",
group: "correctness", 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, deprecation: None,
module: "misc", module: "misc",
}, },
@ -304,14 +304,14 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "declare_interior_mutable_const", name: "declare_interior_mutable_const",
group: "correctness", group: "correctness",
desc: "declaring const with interior mutability", desc: "declaring `const` with interior mutability",
deprecation: None, deprecation: None,
module: "non_copy_const", module: "non_copy_const",
}, },
Lint { Lint {
name: "default_trait_access", name: "default_trait_access",
group: "pedantic", group: "pedantic",
desc: "checks for literal calls to Default::default()", desc: "checks for literal calls to `Default::default()`",
deprecation: None, deprecation: None,
module: "default_trait_access", module: "default_trait_access",
}, },
@ -423,7 +423,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "else_if_without_else", name: "else_if_without_else",
group: "restriction", 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, deprecation: None,
module: "else_if_without_else", module: "else_if_without_else",
}, },
@ -710,14 +710,14 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "if_same_then_else", name: "if_same_then_else",
group: "correctness", group: "correctness",
desc: "if with the same *then* and *else* blocks", desc: "`if` with the same `then` and `else` blocks",
deprecation: None, deprecation: None,
module: "copies", module: "copies",
}, },
Lint { Lint {
name: "ifs_same_cond", name: "ifs_same_cond",
group: "correctness", group: "correctness",
desc: "consecutive `ifs` with the same condition", desc: "consecutive `if`s with the same condition",
deprecation: None, deprecation: None,
module: "copies", module: "copies",
}, },
@ -766,7 +766,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "infallible_destructuring_match", name: "infallible_destructuring_match",
group: "style", 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, deprecation: None,
module: "infallible_destructuring_match", module: "infallible_destructuring_match",
}, },
@ -787,7 +787,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "inherent_to_string_shadow_display", name: "inherent_to_string_shadow_display",
group: "correctness", 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, deprecation: None,
module: "inherent_to_string", module: "inherent_to_string",
}, },
@ -808,7 +808,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "int_plus_one", name: "int_plus_one",
group: "complexity", group: "complexity",
desc: "instead of using x >= y + 1, use x > y", desc: "instead of using `x >= y + 1`, use `x > y`",
deprecation: None, deprecation: None,
module: "int_plus_one", module: "int_plus_one",
}, },
@ -955,21 +955,21 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "let_underscore_must_use", name: "let_underscore_must_use",
group: "restriction", group: "restriction",
desc: "non-binding let on a #[must_use] expression", desc: "non-binding let on a `#[must_use]` expression",
deprecation: None, deprecation: None,
module: "let_underscore", module: "let_underscore",
}, },
Lint { Lint {
name: "let_unit_value", name: "let_unit_value",
group: "style", 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, deprecation: None,
module: "types", module: "types",
}, },
Lint { Lint {
name: "linkedlist", name: "linkedlist",
group: "pedantic", 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, deprecation: None,
module: "types", module: "types",
}, },
@ -1046,28 +1046,28 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "match_as_ref", name: "match_as_ref",
group: "complexity", 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, deprecation: None,
module: "matches", module: "matches",
}, },
Lint { Lint {
name: "match_bool", name: "match_bool",
group: "style", 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, deprecation: None,
module: "matches", module: "matches",
}, },
Lint { Lint {
name: "match_overlapping_arm", name: "match_overlapping_arm",
group: "style", group: "style",
desc: "a match with overlapping arms", desc: "a `match` with overlapping arms",
deprecation: None, deprecation: None,
module: "matches", module: "matches",
}, },
Lint { Lint {
name: "match_ref_pats", name: "match_ref_pats",
group: "style", 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, deprecation: None,
module: "matches", module: "matches",
}, },
@ -1081,7 +1081,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "match_wild_err_arm", name: "match_wild_err_arm",
group: "style", group: "style",
desc: "a match with `Err(_)` arm and take drastic actions", desc: "a `match` with `Err(_)` arm and take drastic actions",
deprecation: None, deprecation: None,
module: "matches", module: "matches",
}, },
@ -1095,7 +1095,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "mem_discriminant_non_enum", name: "mem_discriminant_non_enum",
group: "correctness", group: "correctness",
desc: "calling mem::descriminant on non-enum type", desc: "calling `mem::descriminant` on non-enum type",
deprecation: None, deprecation: None,
module: "mem_discriminant", module: "mem_discriminant",
}, },
@ -1165,7 +1165,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "missing_inline_in_public_items", name: "missing_inline_in_public_items",
group: "restriction", 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, deprecation: None,
module: "missing_inline", module: "missing_inline",
}, },
@ -1270,7 +1270,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "mutable_key_type", name: "mutable_key_type",
group: "correctness", group: "correctness",
desc: "Check for mutable Map/Set key type", desc: "Check for mutable `Map`/`Set` key type",
deprecation: None, deprecation: None,
module: "mut_key", module: "mut_key",
}, },
@ -1382,7 +1382,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "neg_multiply", name: "neg_multiply",
group: "style", group: "style",
desc: "multiplying integers with -1", desc: "multiplying integers with `-1`",
deprecation: None, deprecation: None,
module: "neg_multiply", module: "neg_multiply",
}, },
@ -1480,7 +1480,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "option_map_unit_fn", name: "option_map_unit_fn",
group: "complexity", 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, deprecation: None,
module: "map_unit_fn", module: "map_unit_fn",
}, },
@ -1550,7 +1550,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "panicking_unwrap", name: "panicking_unwrap",
group: "correctness", 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, deprecation: None,
module: "unwrap", module: "unwrap",
}, },
@ -1746,7 +1746,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "result_map_unit_fn", name: "result_map_unit_fn",
group: "complexity", 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, deprecation: None,
module: "map_unit_fn", module: "map_unit_fn",
}, },
@ -1774,7 +1774,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "same_functions_in_if_condition", name: "same_functions_in_if_condition",
group: "pedantic", group: "pedantic",
desc: "consecutive `ifs` with the same function call", desc: "consecutive `if`s with the same function call",
deprecation: None, deprecation: None,
module: "copies", module: "copies",
}, },
@ -1844,14 +1844,14 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "single_match", name: "single_match",
group: "style", 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, deprecation: None,
module: "matches", module: "matches",
}, },
Lint { Lint {
name: "single_match_else", name: "single_match_else",
group: "pedantic", 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, deprecation: None,
module: "matches", module: "matches",
}, },
@ -2159,7 +2159,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "unnecessary_unwrap", name: "unnecessary_unwrap",
group: "complexity", group: "complexity",
desc: "checks for calls of unwrap[_err]() that cannot fail", desc: "checks for calls of `unwrap[_err]()` that cannot fail",
deprecation: None, deprecation: None,
module: "unwrap", module: "unwrap",
}, },
@ -2390,7 +2390,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "zero_divided_by_zero", name: "zero_divided_by_zero",
group: "complexity", 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, deprecation: None,
module: "zero_div_zero", module: "zero_div_zero",
}, },
@ -2404,7 +2404,7 @@ pub const ALL_LINTS: [Lint; 345] = [
Lint { Lint {
name: "zero_ptr", name: "zero_ptr",
group: "style", group: "style",
desc: "using 0 as *{const, mut} T", desc: "using `0 as *{const, mut} T`",
deprecation: None, deprecation: None,
module: "misc", module: "misc",
}, },