rust/tests/rustdoc/issue-74083.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
325 B
Rust
Raw Normal View History

2020-07-06 20:06:58 +00:00
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'
2020-07-06 20:06:58 +00:00
pub struct Bar {
foo: Foo,
}
impl Deref for Bar {
type Target = Foo;
fn deref(&self) -> &Foo {
&self.foo
}
}