diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-01-31 11:54:06 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-04-08 12:00:07 +0000 |
| commit | 89b48a2e22fe4b5f3289e349ae0af81c530f7630 (patch) | |
| tree | 9fb0b651b78aa69ded59c9b2ebbbb5a301fa3871 | |
| parent | 71e02a01a14b00c8bbc4a679d258c07270bfe226 (diff) | |
| download | rust-89b48a2e22fe4b5f3289e349ae0af81c530f7630.tar.gz rust-89b48a2e22fe4b5f3289e349ae0af81c530f7630.zip | |
Thread pattern types through the HIR
| -rw-r--r-- | clippy_lints/src/dereference.rs | 1 | ||||
| -rw-r--r-- | clippy_utils/src/hir_utils.rs | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/clippy_lints/src/dereference.rs b/clippy_lints/src/dereference.rs index 560b2acc1c7..eb317c70926 100644 --- a/clippy_lints/src/dereference.rs +++ b/clippy_lints/src/dereference.rs @@ -821,6 +821,7 @@ impl TyCoercionStability { | TyKind::Array(..) | TyKind::Ptr(_) | TyKind::BareFn(_) + | TyKind::Pat(..) | TyKind::Never | TyKind::Tup(_) | TyKind::Path(_) => Self::Deref, diff --git a/clippy_utils/src/hir_utils.rs b/clippy_utils/src/hir_utils.rs index f8bbe997774..6c3d9329932 100644 --- a/clippy_utils/src/hir_utils.rs +++ b/clippy_utils/src/hir_utils.rs @@ -1068,6 +1068,10 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> { self.hash_ty(ty); self.hash_array_length(len); }, + TyKind::Pat(ty, pat) => { + self.hash_ty(ty); + self.hash_pat(pat); + }, TyKind::Ptr(ref mut_ty) => { self.hash_ty(mut_ty.ty); mut_ty.mutbl.hash(&mut self.s); |
