Skip to content

Commit a01de76

Browse files
Add regression test for rust-lang#132208
1 parent d033809 commit a01de76

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)