-
Notifications
You must be signed in to change notification settings - Fork 42
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
variant macro for blocks #26
Comments
Possibly dup of #8 . |
I already have a PR waiting for the docs related issues. |
EDIT: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=eee7c706369e151473dfbd79ca69d02d has some test usages, and seems to work in all four cases. |
Given @ogoffart's implementation I think it would be easy enough to switch to |
Fixed in #28 I believe |
I often want to cfg some code, but I want to do it on blocks inside a function instead of at the item level.
Would you be open to adding a second macro such as
cfg_if_block
(or other name) that does all the same stuff but working on:block
instead of:item
? I can do the PR if you're interested in the idea.The text was updated successfully, but these errors were encountered: