diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-18 05:16:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-18 05:16:28 +0200 |
| commit | 66dd1729616ddf527f3571104a964dfd56d64bc1 (patch) | |
| tree | 0fdc6e9eca9439ae565269a777ac396910c25cd1 | |
| parent | 4d47d7f38c2b5dfb1c5750af9e9a5d99467f8866 (diff) | |
| parent | 5aa44a855034af13d33445d0643ab9cce0bc9589 (diff) | |
| download | rust-66dd1729616ddf527f3571104a964dfd56d64bc1.tar.gz rust-66dd1729616ddf527f3571104a964dfd56d64bc1.zip | |
Rollup merge of #138528 - dianne:implicit-deref-patterns, r=Nadrieril
deref patterns: implement implicit deref patterns This implements implicit deref patterns (per https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Implicit-deref-patterns) and adds tests and an unstable book chapter. Best reviewed commit-by-commit. Overall there's a lot of additions, but a lot of that is tests, documentation, and simple(?) refactoring. Tracking issue: #87121 r? ``@Nadrieril``
| -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 { |
