diff options
| author | bors <bors@rust-lang.org> | 2020-01-13 22:09:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-13 22:09:39 +0000 |
| commit | c24a42289b50cb6bacb697b90aac2bbe747cdd97 (patch) | |
| tree | c74cb6ec83db22e0acc4039912f5a2beb191e63c /src | |
| parent | 05cb0df748dbc14c43dea4d627d68721a52861c6 (diff) | |
| parent | bba468887bb3c20ff8e38a61bb0f2222836cb451 (diff) | |
| download | rust-c24a42289b50cb6bacb697b90aac2bbe747cdd97.tar.gz rust-c24a42289b50cb6bacb697b90aac2bbe747cdd97.zip | |
Auto merge of #4543 - xiongmao86:issue4503, r=flip1995
Fix issue4503 Fixes #4503. changelog: Add a lint checking user are using FileType.is_file() method and suggest using !FileType.is_dir(). - [x] Followed [lint naming conventions][lint_naming] - [x] Added passing UI tests (including committed `.stderr` file) - [x] `cargo test` passes locally - [x] Executed `./util/dev update_lints` - [x] Added lint documentation - [x] Run `./util/dev fmt`
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 f576bb152de..9cad1ac786a 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; 346] = [ +pub const ALL_LINTS: [Lint; 347] = [ Lint { name: "absurd_extreme_comparisons", group: "correctness", @@ -561,6 +561,13 @@ pub const ALL_LINTS: [Lint; 346] = [ module: "fallible_impl_from", }, Lint { + name: "filetype_is_file", + group: "restriction", + desc: "`FileType::is_file` is not recommended to test for readable file type", + deprecation: None, + module: "methods", + }, + Lint { name: "filter_map", group: "pedantic", desc: "using combinations of `filter`, `map`, `filter_map` and `flat_map` which can usually be written as a single method call", |
