Add a top-level macro for filtering attributes #341

Merged
KodrAus merged 2 commits from fix/doc-alias into main 2023-04-18 23:36:01 -05:00
KodrAus commented 2023-04-17 19:36:26 -05:00 (Migrated from github.com)

Closes #308

This PR re-introduces a macro that filters attributes so that only cfgs are applied on expressions that use flags constants. I noticed we already have the limitation that attributes must be plain identifiers, so attributes like #[some::path] already don't work on flags constants themselves.

I'd appreciate a sanity check of this macro if anyone is keen 🙂 Especially if there's any better way to document what's going on or make the thing more compact so we can easily add any more attributes that we need to propagate without the whole thing becoming impossible to follow.

Closes #308 This PR re-introduces a macro that filters attributes so that only `cfg`s are applied on expressions that use flags constants. I noticed we already have the limitation that attributes must be plain identifiers, so attributes like `#[some::path]` already don't work on flags constants themselves. I'd appreciate a sanity check of this macro if anyone is keen 🙂 Especially if there's any better way to document what's going on or make the thing more compact so we can easily add any more attributes that we need to propagate without the whole thing becoming impossible to follow.
Sign in to join this conversation.
No reviewers
No labels
bug
good first issue
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-bitflags/bitflags!341
No description provided.