Allow specifying attributes in impl mode #406
Labels
No labels
bug
good first issue
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-bitflags/bitflags#406
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm considering
cfg-gating the use ofbitflags!in my libraries, and to that end it would be nice if it was possible to apply attributes to the generatedimpls as well.The naive solution would be:
However, that works poorly with the
doc_cfg(anddoc_auto_cfg) feature, as the attribute is only applied to the macro, and isn't passed down to each output item.Instead, I would like to be able to do the following:
Thanks for the report @madsmtm! Anywhere attributes are allowed to be specified we should support in the macros as much as possible. I think this is just a missing piece of functionality for the impl mode.