]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/issue-74083.rs
Rollup merge of #107412 - tshepang:needless-check, r=wesleywiser
[rust.git] / tests / rustdoc / issue-74083.rs
1 use std::ops::Deref;
2
3 pub struct Foo;
4
5 impl Foo {
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
18     fn deref(&self) -> &Foo {
19         &self.foo
20     }
21 }