-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: nested items should not be documented with --document-private-items
#110422
Comments
@GuillaumeGomez probably knows this, but for others seeing this issue, I think it's probably due to #104889 (which was reverted in #107083, and later re-applied in #107000 (comment)). It has to do with the fact that we're using a HIR visitor now, so we're visiting nested items unconditionally. |
Yes I know where it's coming from. 😄 I was just thinking today that since we were going through the whole HIR without checking whether or not we were in a block, all elements inside the block could be visible. Tested and... 😨 Should be pretty easy to fix. |
For reference, I put up serde-rs/serde#2426 because this was causing documentation to become really verbose with serde + |
Indeed. Don't hesitate to come to me if you have such issues with rustdoc. Such problems should definitely not go unnoticed. |
The thing is, it was not particularly clear from the PRs whether this was intentional or not. |
Unfortunately it wasn't. The goal was to retrieve the missing impl blocks. But if anything isn't clear, don't hesitate to ask too. 😉 |
If we run
rustdoc
with the--document-private-items
option on this code:Both
foo
andbar
are documented, butbar
not being accessible outside offoo
, it shouldn't be documented.The text was updated successfully, but these errors were encountered: