Remove `EnumItemDiscriminant` class
Open
@saeitoshi-10 is already working on this.
Since Jan 3, 2025.
AST
cleanup
good-first-pr
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 231
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 67
Description
Per the Rust reference: https://doc.rust-lang.org/reference/items/enumerations.html
Meaning that all possible enum items (identifiers, structs or tuples) can have a discriminant, even in 1.49 - however, the feature was still experimental back then.
Still, we need to remove the EnumItemDiscriminant class and instead add an optional std::unique_ptr<Expr> to the base EnumItem class, for all enum items to use it if required.
Eventually we'll also need to fix the parser to handle this
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.