store the kind of pattern adjustments in pat_adjustments
This allows us to better distinguish builtin and overloaded implicit dereferences.
This commit is contained in:
parent
328b4fa9fe
commit
5aa44a8550
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue