Match and Pattern compilation checklist
Open
@dafaust is already working on this.
Since Aug 17, 2022.
enhancement
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 231
- Avg merge
- 20h 2m
- Merged PRs (30d)
- 66
Description
This is a brain dump of the various bits of match expressions that we
aren't currently compiling. Probably incomplete.
Patterns https://doc.rust-lang.org/reference/patterns.html
- Literal Patterns
1,'a' - Identifier Patterns and bindings
e @ 1..=5 - Wildcard Patterns
_ - Rest Patterns
.. - Range Patterns
1..=5 - Reference Patterns
- Struct Patterns
- TupleStruct Patterns
- Tuple Patterns
Done? at least in match expressions - Grouped Patterns
&(0..=5) - Path Patterns
- Or-patterns
Foo::A | Foo::B - Slice Patterns
[a, b, _]
Match to-dos (done items not listed)
- path-to-tuple scrutinee #1478 is one fix)
- struct scrutinee (i.e. non-enum ADT)
- nested tuple scrutinee
match ((Foo::A, 1), ('c', Foo::B)) - match arm guards
Some(x) if x < 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.