diff options
| author | xiongmao86 <xiongmao86dev@sina.com> | 2020-01-30 00:21:29 +0800 |
|---|---|---|
| committer | xiongmao86 <xiongmao86dev@sina.com> | 2020-01-30 00:21:29 +0800 |
| commit | 512efbea2321dafd19d30eacb9d8f9d21fcedae2 (patch) | |
| tree | 681f24549f415f811a7e9ae175efbe025f4851dc /src | |
| parent | c0f39cfb466202a1dbe8368ca177848083dc34cb (diff) | |
| download | rust-512efbea2321dafd19d30eacb9d8f9d21fcedae2.tar.gz rust-512efbea2321dafd19d30eacb9d8f9d21fcedae2.zip | |
Declare lint and implement lint logic.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lintlist/mod.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs index 5dbcb4483f2..b762c8d1395 100644 --- a/src/lintlist/mod.rs +++ b/src/lintlist/mod.rs @@ -6,7 +6,7 @@ pub use lint::Lint; pub use lint::LINT_LEVELS; // begin lint list, do not remove this comment, it’s used in `update_lints` -pub const ALL_LINTS: [Lint; 349] = [ +pub const ALL_LINTS: [Lint; 350] = [ Lint { name: "absurd_extreme_comparisons", group: "correctness", @@ -1856,6 +1856,13 @@ pub const ALL_LINTS: [Lint; 349] = [ module: "methods", }, Lint { + name: "single_component_path_imports", + group: "style", + desc: "imports with single component path are redundant", + deprecation: None, + module: "single_component_path_imports", + }, + 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`", |
