forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#133000 - GuillaumeGomez:footnote-ids, r=notriddle [rustdoc] Fix duplicated footnote IDs Fixes rust-lang#131901. Footnote IDs were increased locally (ie, on the docblock) and not globally (ie, on the whole item page). cc `@aDotInTheVoid` r? `@notriddle`
- Loading branch information
Showing
4 changed files
with
92 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// This test ensures that footnotes ID are not duplicated across an item page. | ||
// This is a regression test for <https://github.com/rust-lang/rust/issues/131901>. | ||
|
||
#![crate_name = "foo"] | ||
|
||
//@ has 'foo/struct.Foo.html' | ||
|
||
pub struct Foo; | ||
|
||
impl Foo { | ||
//@ has - '//a[@href="#fn1"]' '1' | ||
//@ has - '//li[@id="fn1"]' 'Hiya' | ||
//@ has - '//a[@href="#fn2"]' '2' | ||
//@ has - '//li[@id="fn2"]' 'Tiya' | ||
/// Link 1 [^1] | ||
/// Link 1.1 [^2] | ||
/// | ||
/// [^1]: Hiya | ||
/// [^2]: Tiya | ||
pub fn l1(){} | ||
|
||
//@ has - '//a[@href="#fn3"]' '1' | ||
//@ has - '//li[@id="fn3"]' 'Yiya' | ||
//@ has - '//a[@href="#fn4"]' '2' | ||
//@ has - '//li[@id="fn4"]' 'Biya' | ||
/// Link 2 [^1] | ||
/// Link 3 [^2] | ||
/// | ||
/// [^1]: Yiya | ||
/// [^2]: Biya | ||
pub fn l2() {} | ||
} | ||
|
||
impl Foo { | ||
//@ has - '//a[@href="#fn5"]' '1' | ||
//@ has - '//li[@id="fn5"]' 'Ciya' | ||
/// Link 3 [^1] | ||
/// | ||
/// [^1]: Ciya | ||
pub fn l3(){} | ||
} |