dtolnay / dtolnay/syn

Parse unnamed enum variant syntax

Open
#2,026 0 comments 0 reactions 0 assignees View on GitHub
syntax
Dominant language
Rust
Stars
3.4k
Forks
374
Avg merge
1d 5h
Merged PRs (30d)
2

Description

- https://github.com/rust-lang/rfcs/pull/3894
- https://github.com/rust-lang/rust/issues/156628

```rust
#[repr(u8)]
enum Color {
Red = 0,
Green = 1,
_ = .., // All other discriminants in `u8` are assigned to unnamed variants
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the linked RFC PR and Rust issue first, then locate syn's enum-parsing entry point and existing enum-variant tests. Confirm that the shown #[repr(u8)] example parses, including `_ = ..` and its unnamed variants, with behavior aligned to the referenced proposal.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.