-
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 #88816 - dns2utf8:rustdoc_test_gui_2k_constants, r=Gu…
…illaumeGomez Rustdoc migrate to table so the gui can handle >2k constants Closes #88545. This PR adds a test for overlapping entries in the `item-table` #88545 It currently includes the commit with the workaround from #88776
- Loading branch information
Showing
7 changed files
with
44 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
goto: file://|DOC_PATH|/test_docs/huge_amount_of_consts/index.html | ||
|
||
// Make sure that the last two entries are more than 12 pixels apart and not stacked on each other. | ||
|
||
compare-elements-position-near-false: ("//*[@class='item-table']//div[last()-1]", "//*[@class='item-table']//div[last()-3]", {"y": 12}) |
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 |
---|---|---|
|
@@ -3,5 +3,7 @@ name = "test_docs" | |
version = "0.1.0" | ||
edition = "2018" | ||
|
||
build = "build.rs" | ||
|
||
[lib] | ||
path = "lib.rs" |
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,15 @@ | ||
//! generate 2000 constants for testing | ||
use std::{fs::write, path::PathBuf}; | ||
|
||
fn main() -> std::io::Result<()> { | ||
let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR is not defined"); | ||
|
||
let mut output = String::new(); | ||
for i in 0..2000 { | ||
let line = format!("/// Some const A{0}\npub const A{0}: isize = 0;\n", i); | ||
output.push_str(&*line); | ||
}; | ||
|
||
write(&[&*out_dir, "huge_amount_of_consts.rs"].iter().collect::<PathBuf>(), output) | ||
} |
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