Skip to content

Duplicate Impl/Traits with rustdoc when using "pub use foo::bar::*" #21474

Closed
@NewbiZ

Description

@NewbiZ

It seems like using glob on use statements ends up generating twice the documentation for Impl and Traits of this Struct.

If I use:

pub use foo::bar::*;

All Impl and Traits of each Struct in foo::bar::* will be duplicated in the doc.
If symbols are listed one by one it works well:

pub use foo::bar::baz;
pub use foo::bar::boz;

Issue can be seen when generating the doc from https://github.com/NewbiZ/rgb/tree/2d3d077120d51bdef42f2e6a83595d2b26a6e04c

If you change in src/lib.rs:

pub use self::cpu::*;

by

pub use self::cpu::Cpu;
pub use self::cpu::Flag;

it will work.

Metadata

Metadata

Assignees

Labels

T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions