Skip to content

rustdoc exposes private use rebindings in the signature of public functions. #49331

@Lymia

Description

@Lymia

Rust will document the test function the following code as taking a ThisIsTotallyNotAnOption<String> rather than a Option<String>. This is confusing at first glance because without looking at the source or actually following the link, there is no indication as to what the type actually is.

use std::option::{Option as ThisIsTotallyNotAnOption};
pub fn test(o: ThisIsTotallyNotAnOption<String>) { }

Metadata

Metadata

Assignees

No one assigned

    Labels

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