File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ // This test ensures that footnotes ID are not duplicated across an item page.
2+ // This is a regression test for <https://github.com/rust-lang/rust/issues/131901>.
3+
4+ #![ crate_name = "foo" ]
5+
6+ //@ has 'foo/struct.Foo.html'
7+
8+ pub struct Foo ;
9+
10+ impl Foo {
11+ //@ has - '//a[@href="#fn1"]' '1'
12+ //@ has - '//li[@id="fn1"]' 'Hiya'
13+ //@ has - '//a[@href="#fn2"]' '2'
14+ //@ has - '//li[@id="fn2"]' 'Tiya'
15+ /// Link 1 [^1]
16+ /// Link 1.1 [^2]
17+ ///
18+ /// [^1]: Hiya
19+ /// [^2]: Tiya
20+ pub fn l1 ( ) { }
21+
22+ //@ has - '//a[@href="#fn3"]' '1'
23+ //@ has - '//li[@id="fn3"]' 'Yiya'
24+ //@ has - '//a[@href="#fn4"]' '2'
25+ //@ has - '//li[@id="fn4"]' 'Biya'
26+ /// Link 2 [^1]
27+ /// Link 3 [^2]
28+ ///
29+ /// [^1]: Yiya
30+ /// [^2]: Biya
31+ pub fn l2 ( ) { }
32+ }
33+
34+ impl Foo {
35+ //@ has - '//a[@href="#fn5"]' '1'
36+ //@ has - '//li[@id="fn5"]' 'Ciya'
37+ /// Link 3 [^1]
38+ ///
39+ /// [^1]: Ciya
40+ pub fn l3 ( ) { }
41+ }
You can’t perform that action at this time.
0 commit comments