diff options
| author | bors <bors@rust-lang.org> | 2022-06-17 21:06:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-17 21:06:09 +0000 |
| commit | e933bb6bc3d7e15cbdbcbc44f7e94c2bde53c450 (patch) | |
| tree | e7f704e55f0f8f3191b721fdd39395dc3e6cdd6b /clippy_utils/src | |
| parent | d7b5cbf065b88830ca519adcb73fad4c0d24b1c7 (diff) | |
| parent | 2bb8c45026f0bfc244390f2d6cecc05cfa1f1171 (diff) | |
| download | rust-e933bb6bc3d7e15cbdbcbc44f7e94c2bde53c450.tar.gz rust-e933bb6bc3d7e15cbdbcbc44f7e94c2bde53c450.zip | |
Auto merge of #8989 - kyoto7250:default_iter_empty, r=Alexendoo
feat(lint): add default_iter_empty close #8915 This PR adds `default_iter_empty` lint. This lint checks `std::iter::Empty::default()` and replace with `std::iter::empty()`. Thank you in advance. --- changelog: add `default_instead_of_iter_empty` lint.
Diffstat (limited to 'clippy_utils/src')
| -rw-r--r-- | clippy_utils/src/paths.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_utils/src/paths.rs b/clippy_utils/src/paths.rs index 89789c3d851..b31e2c1cdb1 100644 --- a/clippy_utils/src/paths.rs +++ b/clippy_utils/src/paths.rs @@ -62,6 +62,7 @@ pub const IO_WRITE: [&str; 3] = ["std", "io", "Write"]; pub const IPADDR_V4: [&str; 5] = ["std", "net", "ip", "IpAddr", "V4"]; pub const IPADDR_V6: [&str; 5] = ["std", "net", "ip", "IpAddr", "V6"]; pub const ITER_COUNT: [&str; 6] = ["core", "iter", "traits", "iterator", "Iterator", "count"]; +pub const ITER_EMPTY: [&str; 5] = ["core", "iter", "sources", "empty", "Empty"]; pub const ITER_REPEAT: [&str; 5] = ["core", "iter", "sources", "repeat", "repeat"]; #[expect(clippy::invalid_paths)] // internal lints do not know about all external crates pub const ITERTOOLS_NEXT_TUPLE: [&str; 3] = ["itertools", "Itertools", "next_tuple"]; |
