Skip to content

rustdoc: items are shown as if defined in crate when reexported cross-module and cross-crate #27123

Closed
@nagisa

Description

@nagisa

Consider

extern crate innercrate; //defines only one public item `from_inner_crate`

pub use inner::{inner_fn, from_inner_crate};


/// Top level documentation
pub fn top_level(){}


pub mod inner {
    pub use innercrate::from_inner_crate;
    /// Defined inside inner module
    pub fn inner_fn(){}
}

Documentation renders from_inner_crate as if it was defined at the top level of crate rather than showing it as an reexport from inner module.

what output from rustdoc looks like

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsP-lowLow priorityT-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