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

Methods from Deref impl aren't filtered by type parameters in Rustdoc #37578

Closed
sfackler opened this issue Nov 4, 2016 · 2 comments
Closed
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@sfackler
Copy link
Member

sfackler commented Nov 4, 2016

use std::ops::Deref;

pub struct Ref<T>(T);

pub struct FooInner;

pub struct Foo(Ref<FooInner>);

impl Ref<FooInner> {
    pub fn foo(&self) {}
}

impl Deref for Foo {
    type Target = Ref<FooInner>;

    fn deref(&self) -> &Ref<FooInner> {
        &self.0
    }
}

pub struct Bar;

impl Ref<Bar> {
    pub fn bar(&self) {}
}

capture

Note that bar is visible in the documentation even though it's only implemented for Ref<Bar>.

@sfackler sfackler added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 4, 2016
@ollie27
Copy link
Member

ollie27 commented Nov 4, 2016

Dupe of #24686?

@sfackler
Copy link
Member Author

sfackler commented Nov 4, 2016

Looks like, thanks

@sfackler sfackler closed this as completed Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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