about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2020-07-06 21:06:58 +0100
committerGary Guo <gary@garyguo.net>2020-07-06 21:18:04 +0100
commit368aa6f1e292d264bcb74fafa25069fe19c49450 (patch)
tree40f2094799080528de727997be45efe12b170cf2
parente0b69f207b276e0432e45bbe41d26a28bbfbfa2e (diff)
downloadrust-368aa6f1e292d264bcb74fafa25069fe19c49450.tar.gz
rust-368aa6f1e292d264bcb74fafa25069fe19c49450.zip
Add test for issue 74083
-rw-r--r--src/test/rustdoc/issue-74083.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/rustdoc/issue-74083.rs b/src/test/rustdoc/issue-74083.rs
new file mode 100644
index 00000000000..28585dafa14
--- /dev/null
+++ b/src/test/rustdoc/issue-74083.rs
@@ -0,0 +1,21 @@
+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'
+pub struct Bar {
+    foo: Foo,
+}
+
+impl Deref for Bar {
+    type Target = Foo;
+
+    fn deref(&self) -> &Foo {
+        &self.foo
+    }
+}