Skip to content

Specific implementations on wrapper types should show up on the page of the inner type #55551

Open

Description

Currently, with the following code:

pub struct Rc<T>(T);

pub struct Foo;


impl Rc<Foo> {
    pub fn bar() {}
}

the impl appears on the page for Rc, even though it's more relevant for Foo.

Provide a way to mark a type as a wrapper type, such that an impl where its first generic parameter is a single type (which may itself be generic, e.g. Rc<Option<T>>) appears on the page of that type.

It may be worth automatically doing this for #[fundamental] types

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

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)A-traitsArea: Trait systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.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