Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use EnumsAsInner to extract enum variants #1268

Open
echou opened this issue May 10, 2024 · 1 comment
Open

feat: use EnumsAsInner to extract enum variants #1268

echou opened this issue May 10, 2024 · 1 comment

Comments

@echou
Copy link

echou commented May 10, 2024

It is quite boring to extract specific enum variant using pattern match. I would like to derive all enums with EnumsAsInner. So I can use expr.as_function(), expr.as_ident() ... much simpler than if let Expr::Function(f) = expr { ... }

@alamb
Copy link
Collaborator

alamb commented May 13, 2024

Possibly related #1204

@tisonkun started doing this for a few types. Maybe we can work on a few more common variants for the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants