diff options
| author | bors <bors@rust-lang.org> | 2021-10-05 06:56:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-05 06:56:57 +0000 |
| commit | 074f63648bd2368d5ca19aed02b5763a144e5d05 (patch) | |
| tree | a39ab48aab1c9740253a22c9ac29b32953e97a45 /src/test/rustdoc-gui | |
| parent | a804c4b1123ae665a8d4f726524109c49efac5b6 (diff) | |
| parent | 068683baf12f61d5ffbf8a7e4858c4e0c3320f3b (diff) | |
| download | rust-074f63648bd2368d5ca19aed02b5763a144e5d05.tar.gz rust-074f63648bd2368d5ca19aed02b5763a144e5d05.zip | |
Auto merge of #89549 - Manishearth:rollup-mhkyc16, r=Manishearth
Rollup of 12 pull requests Successful merges: - #87631 (os current_exe using same approach as linux to get always the full ab…) - #88234 (rustdoc-json: Don't ignore impls for primitive types) - #88651 (Use the 64b inner:monotonize() implementation not the 128b one for aarch64) - #88816 (Rustdoc migrate to table so the gui can handle >2k constants) - #89244 (refactor: VecDeques PairSlices fields to private) - #89364 (rustdoc-json: Encode json files with UTF-8) - #89423 (Fix ICE caused by non_exaustive_omitted_patterns struct lint) - #89426 (bootstrap: add config option for nix patching) - #89462 (haiku thread affinity build fix) - #89482 (Follow the diagnostic output style guide) - #89504 (Don't suggest replacing region with 'static in NLL) - #89535 (fix busted JavaScript in error index generator) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc-gui')
| -rw-r--r-- | src/test/rustdoc-gui/huge-collection-of-constants.goml | 5 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src/test_docs/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src/test_docs/build.rs | 15 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src/test_docs/lib.rs | 4 |
4 files changed, 26 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/huge-collection-of-constants.goml b/src/test/rustdoc-gui/huge-collection-of-constants.goml new file mode 100644 index 00000000000..924fab1ea91 --- /dev/null +++ b/src/test/rustdoc-gui/huge-collection-of-constants.goml @@ -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}) diff --git a/src/test/rustdoc-gui/src/test_docs/Cargo.toml b/src/test/rustdoc-gui/src/test_docs/Cargo.toml index 7f3c65746fc..5f527078e79 100644 --- a/src/test/rustdoc-gui/src/test_docs/Cargo.toml +++ b/src/test/rustdoc-gui/src/test_docs/Cargo.toml @@ -3,5 +3,7 @@ name = "test_docs" version = "0.1.0" edition = "2018" +build = "build.rs" + [lib] path = "lib.rs" diff --git a/src/test/rustdoc-gui/src/test_docs/build.rs b/src/test/rustdoc-gui/src/test_docs/build.rs new file mode 100644 index 00000000000..16c96ded912 --- /dev/null +++ b/src/test/rustdoc-gui/src/test_docs/build.rs @@ -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) +} diff --git a/src/test/rustdoc-gui/src/test_docs/lib.rs b/src/test/rustdoc-gui/src/test_docs/lib.rs index af4f28047fc..0aa1426a36a 100644 --- a/src/test/rustdoc-gui/src/test_docs/lib.rs +++ b/src/test/rustdoc-gui/src/test_docs/lib.rs @@ -116,3 +116,7 @@ pub mod keyword {} /// Just some type alias. pub type SomeType = u32; + +pub mod huge_amount_of_consts { + include!(concat!(env!("OUT_DIR"), "/huge_amount_of_consts.rs")); +} |
