Skip to content
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

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

Open
Manishearth opened this issue Oct 31, 2018 · 0 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) A-trait-system Area: Trait system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Manishearth
Copy link
Member

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

@Manishearth Manishearth added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 31, 2018
@fmease fmease added A-trait-system Area: Trait system A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) A-trait-system Area: Trait system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants