Skip to content

rustdoc: private module appears when overriding glob re-export #60926

Description

@Seeker14491

Consider this code in a crate's lib.rs:

mod m1 {
    pub mod m2 {
        pub struct Foo;
    }
}

pub use m1::*;

use crate::m1::m2;

The generated documentation will show the m2 module at the crate root, though nothing will show up inside the m2 module page. The m2 module is private to outside crates, so I don't think it should be showing up at all.

Meta

rustc --version --verbose:

rustc 1.36.0-nightly (7d5aa43 2019-05-16)
binary: rustc
commit-hash: 7d5aa43
commit-date: 2019-05-16
host: x86_64-pc-windows-msvc
release: 1.36.0-nightly
LLVM version: 8.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-visibilityArea: Visibility / privacyC-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.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