-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
rustdoc: Private function is rendered with a verbose visibility #80101
Copy link
Copy link
Closed
Labels
A-visibilityArea: Visibility / privacyArea: Visibility / privacyC-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Metadata
Metadata
Assignees
Labels
A-visibilityArea: Visibility / privacyArea: Visibility / privacyC-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Type
Fields
Give feedbackNo fields configured for issues without a type.
If I run
cargo +nightly doc --document-private-itemson this code:then the output looks like this:
Note that the visibility is verbose – it says
pub(in foo)when it should show nothing (and used to show nothing).This bug only occurs when the function is private and
--document-private-itemsis passed (of course, the docs are not generated without that flag).