about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorTrinity Pointard <trinity.pointard@gmail.com>2021-06-15 14:30:14 +0200
committerTrinity Pointard <trinity.pointard@gmail.com>2021-06-15 14:30:14 +0200
commit2d76d44eaefc2859c0e5d7645f7a543cd15d5320 (patch)
tree80d3e658f8f888879c297f4f3a71d67479aeb4d9 /src/test/rustdoc
parentaee50f417f38ce57f2491ee86fb386e7d32f241c (diff)
downloadrust-2d76d44eaefc2859c0e5d7645f7a543cd15d5320.tar.gz
rust-2d76d44eaefc2859c0e5d7645f7a543cd15d5320.zip
remove code for recursive Deref in sidebar
fix #85037
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/issue-85037.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/rustdoc/issue-85037.rs b/src/test/rustdoc/issue-85037.rs
new file mode 100644
index 00000000000..86bd246a878
--- /dev/null
+++ b/src/test/rustdoc/issue-85037.rs
@@ -0,0 +1,22 @@
+use std::ops::Deref;
+
+pub struct A {}
+impl A { pub fn foo_a(&self) {} }
+
+pub struct B {}
+impl B { pub fn foo_b(&self) {} }
+
+pub struct C {}
+impl C { pub fn foo_c(&self) {} }
+
+// @has issue_85037/struct.A.html '//div[@class="sidebar-links"]' 'foo_b'
+impl Deref for A {
+    type Target = B;
+    fn deref(&self) -> &B { todo!() }
+}
+
+// @!has issue_85037/struct.A.html '//div[@class="sidebar-links"]' 'foo_c'
+impl Deref for B {
+    type Target = C;
+    fn deref(&self) -> &C { todo!() }
+}