Skip to content

Commit 89b48a2

Browse files
committed
Thread pattern types through the HIR
1 parent 71e02a0 commit 89b48a2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

clippy_lints/src/dereference.rs

+1
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,7 @@ impl TyCoercionStability {
821821
| TyKind::Array(..)
822822
| TyKind::Ptr(_)
823823
| TyKind::BareFn(_)
824+
| TyKind::Pat(..)
824825
| TyKind::Never
825826
| TyKind::Tup(_)
826827
| TyKind::Path(_) => Self::Deref,

clippy_utils/src/hir_utils.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,10 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
10681068
self.hash_ty(ty);
10691069
self.hash_array_length(len);
10701070
},
1071+
TyKind::Pat(ty, pat) => {
1072+
self.hash_ty(ty);
1073+
self.hash_pat(pat);
1074+
},
10711075
TyKind::Ptr(ref mut_ty) => {
10721076
self.hash_ty(mut_ty.ty);
10731077
mut_ty.mutbl.hash(&mut self.s);

0 commit comments

Comments
 (0)