diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-10-02 18:51:01 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2021-10-02 19:38:19 -0500 |
| commit | e165c129324c48a54d321b2dd77e2ff4c7ee9739 (patch) | |
| tree | 5e61755ae5b692c1e5ce69f0c5d99e3a63325831 /clippy_lints/src/mut_key.rs | |
| parent | 2cb37a19110be1f80133a336acae2072ea8e310d (diff) | |
Make diangostic item names consistent
Diffstat (limited to 'clippy_lints/src/mut_key.rs')
| -rw-r--r-- | clippy_lints/src/mut_key.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/mut_key.rs b/clippy_lints/src/mut_key.rs index cb17e4dbfd0..8476257f086 100644 --- a/clippy_lints/src/mut_key.rs +++ b/clippy_lints/src/mut_key.rs @@ -122,7 +122,7 @@ fn check_sig<'tcx>(cx: &LateContext<'tcx>, item_hir_id: hir::HirId, decl: &hir:: fn check_ty<'tcx>(cx: &LateContext<'tcx>, span: Span, ty: Ty<'tcx>) { let ty = ty.peel_refs(); if let Adt(def, substs) = ty.kind() { - let is_keyed_type = [sym::hashmap_type, sym::BTreeMap, sym::hashset_type, sym::BTreeSet] + let is_keyed_type = [sym::HashMap, sym::BTreeMap, sym::HashSet, sym::BTreeSet] .iter() .any(|diag_item| cx.tcx.is_diagnostic_item(*diag_item, def.did)); if is_keyed_type && is_interior_mutable_type(cx, substs.type_at(0), span) { @@ -147,11 +147,11 @@ fn is_interior_mutable_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, span: Sp // that of their type parameters. Note: we don't include `HashSet` and `HashMap` // because they have no impl for `Hash` or `Ord`. let is_std_collection = [ - sym::option_type, - sym::result_type, + sym::Option, + sym::Result, sym::LinkedList, - sym::vec_type, - sym::vecdeque_type, + sym::Vec, + sym::VecDeque, sym::BTreeMap, sym::BTreeSet, sym::Rc, |
