Skip to content

rustdoc: Private function is rendered with a verbose visibility #80101

Description

@camelid

If I run cargo +nightly doc --document-private-items on this code:

mod foo {
    struct S;
    impl S {
        fn new() -> S { S }
    }
}

then the output looks like this:

image

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-items is passed (of course, the docs are not generated without that flag).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-visibilityArea: Visibility / privacyC-bugCategory: This is a bug.P-mediumMedium priorityT-rustdocRelevant 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.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions