recursively reexported crates are erroniously deduplicated.
Open
Nobody has claimed this yet.
C-bug
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
-- Cargo.toml --
[package]
name = "test-re"
version = "0.1.0"
edition = "2024"
[dependencies]
middle.path = "middle"
[workspace]
members = ["inner", "middle"]
-- inner/src/lib.rs --
//! Innermost crate.
-- inner/Cargo.toml --
[package]
name = "inner"
version = "0.1.0"
edition = "2024"
[dependencies]
-- middle/src/lib.rs --
pub use inner;
pub use inner as inner_renamed;
-- middle/Cargo.toml --
[package]
name = "middle"
version = "0.1.0"
edition = "2024"
[dependencies]
inner.path = "../inner"
-- src/lib.rs --
pub use middle::*;
pub use inner_renamed as renamed_again;
Reproduction Steps
cargo doc --open --no-deps
Expected Outcome
test-re docs have 3 items shown at crate root, inner, inner_renamed, and renamed_again.
Actual Output
only inner and renamed_again are present
Version
rustdoc 1.100.0-nightly (2e2b193f8 2026-09-02)
Additional Details
found while building a minimal reproducer for #162161
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal workspace in the issue and run cargo doc --open --no-deps to reproduce the missing inner_renamed item. Trace rustdoc's handling of recursively reexported crates and deduplication. Done means the test-re crate root shows inner, inner_renamed, and renamed_again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100