-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
use std::ops::Deref;
pub struct Base;
impl Base {
pub fn asdf(&self) {}
}
pub struct LevelOne {
pub base: Base,
}
impl Deref for LevelOne {
type Target = Base;
fn deref(&self) -> &Base {
&self.base
}
}
impl LevelOne {
pub fn qwop(&self) {}
}
pub struct LevelTwo {
pub base: LevelOne,
}
impl Deref for LevelTwo {
type Target = LevelOne;
fn deref(&self) -> &LevelOne {
&self.base
}
}
impl LevelTwo {
pub fn custom() {}
}
In this example, LevelTwo
derefs to LevelOne
, which derefs to Base
. However in the docs, only the methods from LevelOne
are shown. We should recursively look for Deref impls on items we're collecting impls for via Deref.
arsdragonfly, aldanor and tmcguire
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.