We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d033809 commit a01de76Copy full SHA for a01de76
tests/rustdoc/intra-doc/link-in-footnotes-132208.rs
@@ -0,0 +1,24 @@
1
+// Rustdoc has multiple passes and if the footnote pass is run before the link replacer
2
+// one, intra doc links are not generated inside footnote definitions. This test
3
+// therefore ensures that intra-doc link are correctly generated inside footnote
4
+// definitions.
5
+//
6
+// Regression test for <https://github.com/rust-lang/rust/issues/132208>.
7
+
8
+#![crate_name = "foo"]
9
10
+//@ has 'foo/index.html'
11
+//@ has - '//*[@class="docblock"]//a[@href="struct.Bar.html"]' 'a'
12
+//@ has - '//*[@class="docblock"]//*[@class="footnotes"]//a[@href="struct.Foo.html"]' 'b'
13
14
+//! [a]: crate::Bar
15
+//! [b]: crate::Foo
16
+//!
17
+//! link in body: [a]
18
19
+//! see footnote[^1]
20
21
+//! [^1]: link in footnote: [b]
22
23
+pub struct Bar;
24
+pub struct Foo;
0 commit comments