1
Fork 0

Auto merge of #134248 - oli-obk:patkind-path-removal, r=BoxyUwU

Merge `PatKind::Path` into `PatKind::Expr`

Follow-up to #134228

We always had a duplication where `Path`s could be represented as `PatKind::Path` or `PatKind::Lit(ExprKind::Path)`. We had to handle both everywhere, and still do after #134228, so I'm removing it now.
This commit is contained in:
bors 2025-01-29 19:16:29 +00:00
commit ae5de6c759
42 changed files with 299 additions and 183 deletions

View file

@ -332,10 +332,6 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
.unwrap_or_else(PatKind::Error)
}
hir::PatKind::Path(ref qpath) => {
return self.lower_path(qpath, pat.hir_id, pat.span);
}
hir::PatKind::Deref(subpattern) => {
let mutable = self.typeck_results.pat_has_ref_mut_binding(subpattern);
let mutability = if mutable { hir::Mutability::Mut } else { hir::Mutability::Not };