From fc4c9a6c7f27dc4cc68d8b2afe77e88a29ff8a31 Mon Sep 17 00:00:00 2001 From: Tymoteusz Jankowski Date: Tue, 19 May 2020 13:54:22 +0200 Subject: Make intra-link resolve links for both trait and impl items --- src/test/rustdoc/issue-72340.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test/rustdoc/issue-72340.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/issue-72340.rs b/src/test/rustdoc/issue-72340.rs new file mode 100644 index 00000000000..6ed3bfbe3e5 --- /dev/null +++ b/src/test/rustdoc/issue-72340.rs @@ -0,0 +1,19 @@ +#![crate_name = "foo"] + +pub struct Body; + +impl Body { + pub fn empty() -> Self { + Body + } + +} + +impl Default for Body { + // @has foo/struct.Body.html '//a/@href' '../foo/struct.Body.html#method.empty' + + /// Returns [`Body::empty()`](Body::empty). + fn default() -> Body { + Body::empty() + } +} -- cgit 1.4.1-3-g733a5