Skip to content

Commit e959fd6

Browse files
Rollup merge of #125275 - GuillaumeGomez:migrate-rustdoc-scrape-examples-test, r=jieyouxu
Migrate `run-make/rustdoc-scrape-examples-test` to new `rmake.rs` Part of #121876. r? ``@jieyouxu``
2 parents b65fcda + 2f8b98c commit e959fd6

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ run-make/rustc-macro-dep-files/Makefile
236236
run-make/rustdoc-io-error/Makefile
237237
run-make/rustdoc-scrape-examples-macros/Makefile
238238
run-make/rustdoc-scrape-examples-multiple/Makefile
239-
run-make/rustdoc-scrape-examples-test/Makefile
240239
run-make/rustdoc-scrape-examples-whitespace/Makefile
241240
run-make/rustdoc-verify-output-files/Makefile
242241
run-make/rustdoc-with-output-option/Makefile

tests/run-make/rustdoc-scrape-examples-invalid-expr/rmake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
mod scrape;
33

44
fn main() {
5-
scrape::scrape();
5+
scrape::scrape(&[]);
66
}

tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
mod scrape;
33

44
fn main() {
5-
scrape::scrape();
5+
scrape::scrape(&[]);
66
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mod scrape;
22

33
fn main() {
4-
scrape::scrape();
4+
scrape::scrape(&[]);
55
}

tests/run-make/rustdoc-scrape-examples-remap/scrape.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use run_make_support::{htmldocck, rustc, rustdoc, source_path, tmp_dir};
22
use std::fs::read_dir;
33
use std::path::Path;
44

5-
pub fn scrape() {
5+
pub fn scrape(extra_args: &[&str]) {
66
let lib_dir = tmp_dir();
77
let out_dir = tmp_dir().join("rustdoc");
88
let crate_name = "foobar";
@@ -29,6 +29,7 @@ pub fn scrape() {
2929
.arg(&out_example)
3030
.arg("--scrape-examples-target-crate")
3131
.arg(crate_name)
32+
.args(extra_args)
3233
.run();
3334
out_deps.push(out_example);
3435
}

tests/run-make/rustdoc-scrape-examples-test/Makefile

-6
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#[path = "../rustdoc-scrape-examples-remap/scrape.rs"]
2+
mod scrape;
3+
4+
fn main() {
5+
scrape::scrape(&["--scrape-tests"]);
6+
}

0 commit comments

Comments
 (0)