Cannot use #[doc(alias)] #308
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#308
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?
The following code:
Produces the error:
This is a general problem for attributes that can't be applied to expressions now. In methods like
from_namewe now generate code like this:I think the quickest fix would be to introduce a helper macro that filtered out some attributes like
#[doc(..)]for these match arms. Any more of these that come up in the future could be added to that macro.What kinds of attributes would be useful to apply there other than
cfg?I can't really think of any besides maybe
#[allow], but we handle those on the item itself. I think it would be fair to flip this into an allow-list so onlycfgattributes get propagated.