Skip to content

Commit 5aa44a8

Browse files
committed
store the kind of pattern adjustments in pat_adjustments
This allows us to better distinguish builtin and overloaded implicit dereferences.
1 parent 328b4fa commit 5aa44a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/pattern_type_mismatch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ fn find_first_mismatch(cx: &LateContext<'_>, pat: &Pat<'_>) -> Option<(Span, Mut
179179
};
180180
if let Some(adjustments) = cx.typeck_results().pat_adjustments().get(adjust_pat.hir_id) {
181181
if let [first, ..] = **adjustments {
182-
if let ty::Ref(.., mutability) = *first.kind() {
182+
if let ty::Ref(.., mutability) = *first.source.kind() {
183183
let level = if p.hir_id == pat.hir_id {
184184
Level::Top
185185
} else {

0 commit comments

Comments
 (0)