summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/issue-74083.rs
blob: c7f5d7eaa585520b6e2e527c060151c365efa79c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std::ops::Deref;

pub struct Foo;

impl Foo {
    pub fn foo(&mut self) {}
}

// @has issue_74083/struct.Bar.html
// @!has - '//div[@class="sidebar-links"]/a[@href="#method.foo"]' 'foo'
pub struct Bar {
    foo: Foo,
}

impl Deref for Bar {
    type Target = Foo;

    fn deref(&self) -> &Foo {
        &self.foo
    }
}