1 use std::ops::Deref;
2 
3 pub struct Foo;
4 
5 impl Foo {
foo(&mut self)6     pub fn foo(&mut self) {}
7 }
8 
9 // @has issue_74083/struct.Bar.html
10 // @!has - '//div[@class="sidebar-links"]/a[@href="#method.foo"]' 'foo'
11 pub struct Bar {
12     foo: Foo,
13 }
14 
15 impl Deref for Bar {
16     type Target = Foo;
17 
deref(&self) -> &Foo18     fn deref(&self) -> &Foo {
19         &self.foo
20     }
21 }
22