Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/hir.rs')
-rw-r--r--crates/hir-def/src/hir.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/hir-def/src/hir.rs b/crates/hir-def/src/hir.rs
index a1a346cabc..93fa7ff961 100644
--- a/crates/hir-def/src/hir.rs
+++ b/crates/hir-def/src/hir.rs
@@ -666,6 +666,8 @@ pub struct RecordFieldPat {
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum Pat {
Missing,
+ /// A rest pattern. Not valid outside special context.
+ Rest,
Wild,
Tuple {
args: Box<[PatId]>,
@@ -721,6 +723,7 @@ impl Pat {
| Pat::ConstBlock(..)
| Pat::Wild
| Pat::Missing
+ | Pat::Rest
| Pat::Expr(_) => {}
Pat::Bind { subpat, .. } => {
subpat.iter().copied().for_each(f);