Rust-GCC / Rust-GCC/gccrs

Match and Pattern compilation checklist

Open
#1,479 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.