diff options
| author | dianne <diannes.gm@gmail.com> | 2025-03-14 18:56:15 -0700 |
|---|---|---|
| committer | dianne <diannes.gm@gmail.com> | 2025-04-12 17:42:09 -0700 |
| commit | 5aa44a855034af13d33445d0643ab9cce0bc9589 (patch) | |
| tree | 471bfe6df49f44a61ece222907363aa591372414 | |
| parent | 328b4fa9fe69d9d1ba5fb5329b33eee71e29329b (diff) | |
store the kind of pattern adjustments in `pat_adjustments`
This allows us to better distinguish builtin and overloaded implicit dereferences.
| -rw-r--r-- | clippy_lints/src/pattern_type_mismatch.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/pattern_type_mismatch.rs b/clippy_lints/src/pattern_type_mismatch.rs index 8f1a1ee76c6..96d3f7196c0 100644 --- a/clippy_lints/src/pattern_type_mismatch.rs +++ b/clippy_lints/src/pattern_type_mismatch.rs @@ -179,7 +179,7 @@ fn find_first_mismatch(cx: &LateContext<'_>, pat: &Pat<'_>) -> Option<(Span, Mut }; if let Some(adjustments) = cx.typeck_results().pat_adjustments().get(adjust_pat.hir_id) { if let [first, ..] = **adjustments { - if let ty::Ref(.., mutability) = *first.kind() { + if let ty::Ref(.., mutability) = *first.source.kind() { let level = if p.hir_id == pat.hir_id { Level::Top } else { |
