Eliminate PatKind::Path
This commit is contained in:
parent
ccc9ba5c30
commit
f47ad71059
39 changed files with 273 additions and 174 deletions
|
@ -105,7 +105,10 @@ impl hir::Pat<'_> {
|
|||
let mut variants = vec![];
|
||||
self.walk(|p| match &p.kind {
|
||||
PatKind::Or(_) => false,
|
||||
PatKind::Path(hir::QPath::Resolved(_, path))
|
||||
PatKind::Expr(hir::PatExpr {
|
||||
kind: hir::PatExprKind::Path(hir::QPath::Resolved(_, path)),
|
||||
..
|
||||
})
|
||||
| PatKind::TupleStruct(hir::QPath::Resolved(_, path), ..)
|
||||
| PatKind::Struct(hir::QPath::Resolved(_, path), ..) => {
|
||||
if let Res::Def(DefKind::Variant | DefKind::Ctor(CtorOf::Variant, ..), id) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue