diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2021-11-11 14:15:01 -0500 |
|---|---|---|
| committer | Jason Newcomb <jsnewcomb@pm.me> | 2022-10-02 15:02:55 -0400 |
| commit | 162aa19793f21c99cf7ec2a8c080ee2f8843f7db (patch) | |
| tree | 996b5d40be199472d950c4fc9431bcedcba2bffd /clippy_utils/src/paths.rs | |
| parent | 8e7af6b42961d6a4b6857c06aa5139a985e0009d (diff) | |
| download | rust-162aa19793f21c99cf7ec2a8c080ee2f8843f7db.tar.gz rust-162aa19793f21c99cf7ec2a8c080ee2f8843f7db.zip | |
Fix and improve internal lint checking for `match_type` usages
* Check for `const`s and `static`s from external crates
* Check for `LangItem`s
* Handle inherent functions which have the same name as a field
* Also check the following functions:
* `match_trait_method`
* `match_def_path`
* `is_expr_path_def_path`
* `is_qpath_def_path`
* Handle checking for a constructor to a diagnostic item or `LangItem`
Diffstat (limited to 'clippy_utils/src/paths.rs')
| -rw-r--r-- | clippy_utils/src/paths.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/clippy_utils/src/paths.rs b/clippy_utils/src/paths.rs index 07170e2df12..13938645fc3 100644 --- a/clippy_utils/src/paths.rs +++ b/clippy_utils/src/paths.rs @@ -34,7 +34,6 @@ pub const DEFAULT_TRAIT_METHOD: [&str; 4] = ["core", "default", "Default", "defa pub const DEREF_MUT_TRAIT_METHOD: [&str; 5] = ["core", "ops", "deref", "DerefMut", "deref_mut"]; /// Preferably use the diagnostic item `sym::deref_method` where possible pub const DEREF_TRAIT_METHOD: [&str; 5] = ["core", "ops", "deref", "Deref", "deref"]; -pub const DIR_BUILDER: [&str; 3] = ["std", "fs", "DirBuilder"]; pub const DISPLAY_TRAIT: [&str; 3] = ["core", "fmt", "Display"]; #[cfg(feature = "internal")] pub const EARLY_CONTEXT: [&str; 2] = ["rustc_lint", "EarlyContext"]; @@ -64,8 +63,6 @@ pub const IDENT_AS_STR: [&str; 4] = ["rustc_span", "symbol", "Ident", "as_str"]; pub const INDEX: [&str; 3] = ["core", "ops", "Index"]; pub const INDEX_MUT: [&str; 3] = ["core", "ops", "IndexMut"]; pub const INSERT_STR: [&str; 4] = ["alloc", "string", "String", "insert_str"]; -pub const IO_READ: [&str; 3] = ["std", "io", "Read"]; -pub const IO_WRITE: [&str; 3] = ["std", "io", "Write"]; 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"]; |
