Skip to content

Commit 368aa6f

Browse files
committed
Add test for issue 74083
1 parent e0b69f2 commit 368aa6f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/test/rustdoc/issue-74083.rs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
}

0 commit comments

Comments
 (0)