-
Notifications
You must be signed in to change notification settings - Fork 13k
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 #94260 - GuillaumeGomez:infinite-redirection, r=notri…
…ddle Fix rustdoc infinite redirection generation Someone came to me about a funny bug they had when clicking on any link on [this page](https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs/stable/latest/docs/libadwaita/builders/index.html): it ended one page redirecting to itself indefinitely. I was able to make a minimum reproducible case to trigger this bug which I now use as a test. r? ``@notriddle``
- Loading branch information
Showing
2 changed files
with
63 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#![crate_name = "foo"] | ||
|
||
// This test ensures that there is no "infinite redirection" file generated (a | ||
// file which redirects to itself). | ||
|
||
// We check it's not a redirection file. | ||
// @has 'foo/builders/struct.ActionRowBuilder.html' | ||
// @has - '//*[@id="synthetic-implementations"]' 'Auto Trait Implementations' | ||
|
||
// And that the link in the module is targetting it. | ||
// @has 'foo/builders/index.html' | ||
// @has - '//a[@href="struct.ActionRowBuilder.html"]' 'ActionRowBuilder' | ||
|
||
mod auto { | ||
mod action_row { | ||
pub struct ActionRowBuilder; | ||
} | ||
|
||
#[doc(hidden)] | ||
pub mod builders { | ||
pub use super::action_row::ActionRowBuilder; | ||
} | ||
} | ||
|
||
pub use auto::*; | ||
|
||
pub mod builders { | ||
pub use crate::auto::builders::*; | ||
} |