1
Fork 0

initial implementation of or-pattern parsing

Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`.
This is a partial implementation of RFC 2535.
This commit is contained in:
Dan Robertson 2019-07-14 01:05:52 +00:00
parent 1713ac4bf5
commit 1870537f27
No known key found for this signature in database
GPG key ID: 45C4A652C47E42A5
22 changed files with 142 additions and 60 deletions

View file

@ -650,6 +650,7 @@ pub enum PatKind {
TupleStruct(Path, Vec<P<Pat>>),
/// An or-pattern `A | B | C`.
/// Invariant: `pats.len() >= 2`.
Or(Vec<P<Pat>>),
/// A possibly qualified path pattern.