about summary refs log tree commit diff
path: root/src/librustc/hir/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc/hir/mod.rs')
-rw-r--r--src/librustc/hir/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs
index 57fd0be77ec..2ae08568b7f 100644
--- a/src/librustc/hir/mod.rs
+++ b/src/librustc/hir/mod.rs
@@ -882,6 +882,7 @@ impl Pat {
             PatKind::TupleStruct(_, ref s, _) | PatKind::Tuple(ref s, _) => {
                 s.iter().all(|p| p.walk_(it))
             }
+            PatKind::Or(ref pats) => pats.iter().all(|p| p.walk_(it)),
             PatKind::Box(ref s) | PatKind::Ref(ref s, _) => {
                 s.walk_(it)
             }
@@ -976,6 +977,9 @@ pub enum PatKind {
     /// `0 <= position <= subpats.len()`
     TupleStruct(QPath, HirVec<P<Pat>>, Option<usize>),
 
+    /// An or-pattern `A | B | C`.
+    Or(Vec<P<Pat>>),
+
     /// A path pattern for an unit struct/variant or a (maybe-associated) constant.
     Path(QPath),