Skip to content

Commit a178559

Browse files
committed
address review comments
1 parent f1df0c5 commit a178559

File tree

1 file changed

+30
-36
lines changed
  • tests/run-make/rustc-crates-on-stable

1 file changed

+30
-36
lines changed

Diff for: tests/run-make/rustc-crates-on-stable/rmake.rs

+30-36
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,36 @@
11
//! Checks if selected rustc crates can be compiled on the stable channel (or a "simulation" of it).
22
//! These crates are designed to be used by downstream users.
33
4-
use run_make_support::{cargo, run_in_tmpdir, rustc_path, source_root};
4+
use run_make_support::{cargo, rustc_path, source_root};
55

66
fn main() {
7-
run_in_tmpdir(|| {
8-
// Use the stage0 beta cargo for the compilation (it shouldn't really matter which cargo we
9-
// use)
10-
let cargo = cargo()
11-
// Ensure `proc-macro2`'s nightly detection is disabled
12-
.env("RUSTC_STAGE", "0")
13-
.env("RUSTC", rustc_path())
14-
// We want to disallow all nightly features to simulate a stable build
15-
.env("RUSTFLAGS", "-Zallow-features=")
16-
.arg("build")
17-
.arg("--manifest-path")
18-
.arg(source_root().join("Cargo.toml"))
19-
.args(&[
20-
"--config",
21-
r#"workspace.exclude=["library/core"]"#,
22-
// Avoid depending on transitive rustc crates
23-
"--no-default-features",
24-
// Emit artifacts in this temporary directory, not in the source_root's `target`
25-
// folder
26-
"--target-dir",
27-
".",
28-
])
29-
// Check that these crates can be compiled on "stable"
30-
.args(&[
31-
"-p",
32-
"rustc_type_ir",
33-
"-p",
34-
"rustc_next_trait_solver",
35-
"-p",
36-
"rustc_pattern_analysis",
37-
"-p",
38-
"rustc_lexer",
39-
])
40-
.run();
41-
});
7+
// Use the stage0 beta cargo for the compilation (it shouldn't really matter which cargo we use)
8+
cargo()
9+
// Ensure `proc-macro2`'s nightly detection is disabled
10+
.env("RUSTC_STAGE", "0")
11+
.env("RUSTC", rustc_path())
12+
// We want to disallow all nightly features to simulate a stable build
13+
.env("RUSTFLAGS", "-Zallow-features=")
14+
.arg("build")
15+
.arg("--manifest-path")
16+
.arg(source_root().join("Cargo.toml"))
17+
.args(&[
18+
// Avoid depending on transitive rustc crates
19+
"--no-default-features",
20+
// Emit artifacts in this temporary directory, not in the source_root's `target` folder
21+
"--target-dir",
22+
"target",
23+
])
24+
// Check that these crates can be compiled on "stable"
25+
.args(&[
26+
"-p",
27+
"rustc_type_ir",
28+
"-p",
29+
"rustc_next_trait_solver",
30+
"-p",
31+
"rustc_pattern_analysis",
32+
"-p",
33+
"rustc_lexer",
34+
])
35+
.run();
4236
}

0 commit comments

Comments
 (0)