about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorFlorian Warzecha <liketechnik@disroot.org>2020-11-09 19:58:19 +0100
committerFlorian Warzecha <liketechnik@disroot.org>2020-11-10 01:02:38 +0100
commit7beb0da4a9391facbb636a370a47d7439c8ee862 (patch)
treeb6b69fbcee5b445c620e836160aae9ae097e3b2a /src/test/rustdoc
parent25f6938da459a57b43bdf16ed6bdad3225b2a3ce (diff)
downloadrust-7beb0da4a9391facbb636a370a47d7439c8ee862.tar.gz
rust-7beb0da4a9391facbb636a370a47d7439c8ee862.zip
(rustdoc) [src] link for types defined by macros shows invocation
Previously the [src] link on types defined by a macro
pointed to the macro definition.
This commit makes the Clean-Implementation for Spans
aware of macro defined types,
so that the link points to the invocation instead.
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/external-macro-src.rs7
-rw-r--r--src/test/rustdoc/issue-26606.rs2
-rw-r--r--src/test/rustdoc/thread-local-src.rs2
3 files changed, 4 insertions, 7 deletions
diff --git a/src/test/rustdoc/external-macro-src.rs b/src/test/rustdoc/external-macro-src.rs
index 4394415e5c7..6a7dbb004a3 100644
--- a/src/test/rustdoc/external-macro-src.rs
+++ b/src/test/rustdoc/external-macro-src.rs
@@ -1,15 +1,12 @@
 // aux-build:external-macro-src.rs
-// ignore-tidy-linelength
 
 #![crate_name = "foo"]
 
 #[macro_use]
 extern crate external_macro_src;
 
-// @has foo/index.html '//a[@href="../src/foo/external-macro-src.rs.html#4-15"]' '[src]'
+// @has foo/index.html '//a[@href="../src/foo/external-macro-src.rs.html#3-12"]' '[src]'
 
 // @has foo/struct.Foo.html
-// @has - '//a[@href="https://example.com/src/external_macro_src/external-macro-src.rs.html#8"]' '[src]'
-// @has - '//a[@href="https://example.com/src/external_macro_src/external-macro-src.rs.html#9-13"]' '[src]'
-// @has - '//a[@href="https://example.com/src/external_macro_src/external-macro-src.rs.html#10-12"]' '[src]'
+// @has - '//a[@href="../src/foo/external-macro-src.rs.html#12"]' '[src]'
 make_foo!();
diff --git a/src/test/rustdoc/issue-26606.rs b/src/test/rustdoc/issue-26606.rs
index c8e9a63ea9f..bd6f38e9123 100644
--- a/src/test/rustdoc/issue-26606.rs
+++ b/src/test/rustdoc/issue-26606.rs
@@ -7,5 +7,5 @@
 extern crate issue_26606_macro;
 
 // @has issue_26606/constant.FOO.html
-// @has - '//a/@href' '../src/issue_26606_macro/issue-26606-macro.rs.html#3'
+// @has - '//a[@href="../src/issue_26606/issue-26606.rs.html#11"]' '[src]'
 make_item!(FOO);
diff --git a/src/test/rustdoc/thread-local-src.rs b/src/test/rustdoc/thread-local-src.rs
index 022d81a4dbf..5e56bb5819a 100644
--- a/src/test/rustdoc/thread-local-src.rs
+++ b/src/test/rustdoc/thread-local-src.rs
@@ -2,5 +2,5 @@
 
 // @has foo/index.html '//a[@href="../src/foo/thread-local-src.rs.html#1-6"]' '[src]'
 
-// @has foo/constant.FOO.html '//a/@href' 'https://doc.rust-lang.org/nightly/src/std/'
+// @has foo/constant.FOO.html '//a[@href="../src/foo/thread-local-src.rs.html#6"]' '[src]'
 thread_local!(pub static FOO: bool = false);