Skip to content

Documentation on re-exports is ignored if the item is defined in the same crate #84619

Closed
@jyn514

Description

@jyn514

I tried this code:

mod inner_mod {
    /// docs from inner module
    pub fn g() {}
}

/// docs from outer module
pub use inner_mod::g;

I expected to see this happen: The documentation is added, like it is for cross-crate re-exports:
image

/// Some docs from outer crate
pub use inner::f;

Instead, this happened: The documentation is ignored:

image

Meta

rustdoc --version: rustdoc 1.53.0-nightly (392ba2b 2021-04-17)

Originally posted by @jsgf in #84597 (comment)

Metadata

Metadata

Assignees

Labels

A-cross-crate-reexportsArea: Documentation that has been re-exported from a different crateC-bugCategory: This is a bug.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