Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inaccessible local modules nested in functions are documented #111415

Closed
calebzulawski opened this issue May 10, 2023 · 4 comments · Fixed by #111642
Closed

Inaccessible local modules nested in functions are documented #111415

calebzulawski opened this issue May 10, 2023 · 4 comments · Fixed by #111642
Assignees
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@calebzulawski
Copy link
Member

Consider the following code

pub fn foo() {
    pub mod inaccessible {}
}

inaccessible is local to foo and inaccessible, and should not be documented. Instead, rustdoc currently documents the module at the same level as foo.

Meta

rustc --version --verbose:

rustc 1.69.0 (84c898d65 2023-04-16)
binary: rustc
commit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc
commit-date: 2023-04-16
host: x86_64-apple-darwin
release: 1.69.0
LLVM version: 15.0.7
@calebzulawski calebzulawski added the C-bug Category: This is a bug. label May 10, 2023
@compiler-errors compiler-errors added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 10, 2023
@compiler-errors
Copy link
Member

cc @GuillaumeGomez does this have to do with those changes you made to item collection?

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented May 10, 2023

Very likely. I won't be able to fix it until next week though.

EDIT: I suspect it broke from #111095.

@calebzulawski calebzulawski changed the title Inaccessible local modules nested in functions are documented on nightly Inaccessible local modules nested in functions are documented May 10, 2023
@calebzulawski
Copy link
Member Author

I just realized that this is broken on stable, too, so I think the cause may be older than that?

@GuillaumeGomez
Copy link
Member

Oh. I'm at least happy to realize that I didn't break it recently. Thanks for the report. Will fix it monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants