dtolnay / dtolnay/syn

Support parsing arms of `cfg_select!{}`

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

Description

`syn::Arm` almost allows parsing the arms of `cfg_select`, except that it expects a `Pat` for each arm which doesn't allow for the cfg predicates that `cfg_select` expects.

Would you be open to supporting parsing these `cfg_select` arms? Either by modifying `syn::Arm` to encompass them, or through an additional type? I'd be glad to implement this, but I just wanted to check if you'd consider this in-scope for `syn`.

(Technically `cfg_select` does already parse, since it can be treated as a regular macro. But I need to parse into the arms as well for my use-case.)

`cfg_select`: https://doc.rust-lang.org/beta/std/macro.cfg_select.html

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.