about summary refs log tree commit diff
path: root/src/test/rustdoc/check-source-code-urls-to-def.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-06-12 22:08:43 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-08-05 23:08:29 +0200
commitfd69fa8670aaf67cde504acd097a2b4ddc74f88a (patch)
treeeea498abfa4f9a2cda08f0c3bdc95240f6367952 /src/test/rustdoc/check-source-code-urls-to-def.rs
parent1a48d1a4de1e26e08780a026daed3c7db743ff2f (diff)
downloadrust-fd69fa8670aaf67cde504acd097a2b4ddc74f88a.tar.gz
rust-fd69fa8670aaf67cde504acd097a2b4ddc74f88a.zip
Add missing root_path when generating links using href
Diffstat (limited to 'src/test/rustdoc/check-source-code-urls-to-def.rs')
-rw-r--r--src/test/rustdoc/check-source-code-urls-to-def.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/test/rustdoc/check-source-code-urls-to-def.rs b/src/test/rustdoc/check-source-code-urls-to-def.rs
index 5caef29fede..51c4835b5aa 100644
--- a/src/test/rustdoc/check-source-code-urls-to-def.rs
+++ b/src/test/rustdoc/check-source-code-urls-to-def.rs
@@ -1,7 +1,11 @@
 // compile-flags: -Zunstable-options --generate-link-to-definition
+// aux-build:source_code.rs
+// build-aux-docs
 
 #![crate_name = "foo"]
 
+extern crate source_code;
+
 // @has 'src/foo/check-source-code-urls-to-def.rs.html'
 
 // @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#1-17"]' 'bar'
@@ -23,13 +27,14 @@ impl Foo {
 fn babar() {}
 
 // @has - '//a[@href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"]' 'String'
-// @count - '//a[@href="../../src/foo/check-source-code-urls-to-def.rs.html#17"]' 5
-pub fn foo(a: u32, b: &str, c: String, d: Foo, e: bar::Bar) {
+// @count - '//a[@href="../../src/foo/check-source-code-urls-to-def.rs.html#21"]' 5
+// @has - '//a[@href="../../source_code/struct.SourceCode.html"]' 'source_code::SourceCode'
+pub fn foo(a: u32, b: &str, c: String, d: Foo, e: bar::Bar, f: source_code::SourceCode) {
     let x = 12;
     let y: Foo = Foo;
     let z: Bar = bar::Bar { field: Foo };
     babar();
-    // @has - '//a[@href="../../src/foo/check-source-code-urls-to-def.rs.html#20"]' 'hello'
+    // @has - '//a[@href="../../src/foo/check-source-code-urls-to-def.rs.html#24"]' 'hello'
     y.hello();
 }