Regression in v2: flag constants no longer appear in cargo doc output #320
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#320
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?
Steps to reproduce:
Replace
src/lib.rswith:Run
cargo doc --openand search for "hello". It doesn't find anything of that name, and if you go to theFlagspage it indeed has no documented constants.If you change
Cargo.tomlto usebitflags = "1"and re-runcargo doc, the constant is there as expected:I think this is due to https://github.com/bitflags/bitflags/pull/282, as demonstrated with this example:
Running
cargo docon that showsA::VALbut notB::VAL.This issue is fixed upstream, but won't make it to a stable release until April 20th so it might be worth us mitigating it here anyways. It should be fairly straightforward. We can split the
implblock that defines those constants from the one that implements other methods and move the constants to outside theconst _: () { .. }block.Thanks for the fix :)