File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Checks that the link generated
2
+ // Regression test for <https://github.com/rust-lang/rust/issues/137857>.
3
+
4
+ //@ compile-flags: --document-private-items -Z unstable-options
5
+ //@ compile-flags: --extern-html-root-url=empty=https://docs.rs/
6
+ // This one is to ensure that we don't link "by default" any item we see which has
7
+ // an external html root URL.
8
+ //@ compile-flags: --extern-html-root-url=non_existent=https://docs.rs/
9
+ //@ aux-build: empty.rs
10
+
11
+ #![ crate_name = "foo" ]
12
+ #![ allow( rustdoc:: broken_intra_doc_links) ]
13
+
14
+ //@ has 'foo/index.html'
15
+ //@ has - '//a[@href="https://docs.rs/empty/index.html"]' 'empty'
16
+ // There should only be one intra doc links, we should not link `non_existent`.
17
+ //@ count - '//*[@class="docblock"]//a' 1
18
+ //! [`empty`]
19
+ //!
20
+ //! [`non_existent`]
21
+
22
+ extern crate empty;
You can’t perform that action at this time.
0 commit comments