Introduce 'ast::Pat::is_rest(&self) -> bool'.
This commit is contained in:
parent
f7c75cc11a
commit
ff77ef2d70
@ -580,6 +580,14 @@ impl Pat {
|
|||||||
| PatKind::Mac(_) => true,
|
| PatKind::Mac(_) => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Is this a `..` pattern?
|
||||||
|
pub fn is_rest(&self) -> bool {
|
||||||
|
match self.node {
|
||||||
|
PatKind::Rest => true,
|
||||||
|
_ => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A single field in a struct pattern
|
/// A single field in a struct pattern
|
||||||
|
Loading…
Reference in New Issue
Block a user