2020-07-06 15:06:58 -05:00
|
|
|
use std::ops::Deref;
|
|
|
|
|
|
|
|
pub struct Foo;
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
pub fn foo(&mut self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
// @has issue_74083/struct.Bar.html
|
2020-12-31 14:47:09 -06:00
|
|
|
// @!has - '//div[@class="sidebar-links"]/a[@href="#method.foo"]' 'foo'
|
2020-07-06 15:06:58 -05:00
|
|
|
pub struct Bar {
|
|
|
|
foo: Foo,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Deref for Bar {
|
|
|
|
type Target = Foo;
|
|
|
|
|
|
|
|
fn deref(&self) -> &Foo {
|
|
|
|
&self.foo
|
|
|
|
}
|
|
|
|
}
|