diff options
Diffstat (limited to 'crates/hir_def/src/expr.rs')
-rw-r--r-- | crates/hir_def/src/expr.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/hir_def/src/expr.rs b/crates/hir_def/src/expr.rs index e5d740a36..b1e57c693 100644 --- a/crates/hir_def/src/expr.rs +++ b/crates/hir_def/src/expr.rs | |||
@@ -399,12 +399,18 @@ pub enum Pat { | |||
399 | TupleStruct { path: Option<Path>, args: Vec<PatId>, ellipsis: Option<usize> }, | 399 | TupleStruct { path: Option<Path>, args: Vec<PatId>, ellipsis: Option<usize> }, |
400 | Ref { pat: PatId, mutability: Mutability }, | 400 | Ref { pat: PatId, mutability: Mutability }, |
401 | Box { inner: PatId }, | 401 | Box { inner: PatId }, |
402 | ConstBlock(ExprId), | ||
402 | } | 403 | } |
403 | 404 | ||
404 | impl Pat { | 405 | impl Pat { |
405 | pub fn walk_child_pats(&self, mut f: impl FnMut(PatId)) { | 406 | pub fn walk_child_pats(&self, mut f: impl FnMut(PatId)) { |
406 | match self { | 407 | match self { |
407 | Pat::Range { .. } | Pat::Lit(..) | Pat::Path(..) | Pat::Wild | Pat::Missing => {} | 408 | Pat::Range { .. } |
409 | | Pat::Lit(..) | ||
410 | | Pat::Path(..) | ||
411 | | Pat::ConstBlock(..) | ||
412 | | Pat::Wild | ||
413 | | Pat::Missing => {} | ||
408 | Pat::Bind { subpat, .. } => { | 414 | Pat::Bind { subpat, .. } => { |
409 | subpat.iter().copied().for_each(f); | 415 | subpat.iter().copied().for_each(f); |
410 | } | 416 | } |