Skip to content

Commit e853ab6

Browse files
committed
Rid the rmake test runners of extern crate run_make_support;
1 parent 80451a4 commit e853ab6

File tree

31 files changed

+37
-123
lines changed

31 files changed

+37
-123
lines changed

tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,17 @@
33
// Check that the `CURRENT_RUSTC_VERSION` placeholder is correctly replaced by the current
44
// `rustc` version and the `since` property in feature stability gating is properly respected.
55

6-
extern crate run_make_support;
7-
86
use std::path::PathBuf;
97

10-
use run_make_support::{rustc, aux_build};
8+
use run_make_support::{aux_build, rustc};
119

1210
fn main() {
1311
aux_build().input("stable.rs").emit("metadata").run();
1412

1513
let mut stable_path = PathBuf::from(env!("TMPDIR"));
1614
stable_path.push("libstable.rmeta");
1715

18-
let output = rustc()
19-
.input("main.rs")
20-
.emit("metadata")
21-
.extern_("stable", &stable_path)
22-
.output();
16+
let output = rustc().input("main.rs").emit("metadata").extern_("stable", &stable_path).output();
2317

2418
let stderr = String::from_utf8_lossy(&output.stderr);
2519
let version = include_str!(concat!(env!("S"), "/src/version"));

tests/run-make/a-b-a-linker-guard/rmake.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// Test that if we build `b` against a version of `a` that has one set of types, it will not run
44
// with a dylib that has a different set of types.
55

6-
extern crate run_make_support;
7-
86
use run_make_support::{run, run_fail, rustc};
97

108
fn main() {

tests/run-make/arguments-non-c-like-enum/rmake.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! Check that non-trivial `repr(C)` enum in Rust has valid C layout.
22
//@ ignore-cross-compile
33

4-
extern crate run_make_support;
5-
64
use run_make_support::{cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib};
75

86
pub fn main() {

tests/run-make/artifact-incr-cache-no-obj/rmake.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
//
66
// Fixes: rust-lang/rust#123234
77

8-
extern crate run_make_support;
9-
108
use run_make_support::{rustc, tmp_dir};
119

1210
fn main() {

tests/run-make/artifact-incr-cache/rmake.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
// Also see discussion at
88
// <https://internals.rust-lang.org/t/interaction-between-incremental-compilation-and-emit/20551>
99

10-
extern crate run_make_support;
11-
1210
use run_make_support::{rustc, tmp_dir};
1311

1412
fn main() {

tests/run-make/compiler-builtins/rmake.rs

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
#![deny(warnings)]
1616

17-
extern crate run_make_support;
18-
1917
use run_make_support::object;
2018
use run_make_support::object::read::archive::ArchiveFile;
2119
use run_make_support::object::read::Object;
@@ -51,22 +49,22 @@ fn main() {
5149
let bootstrap_cargo = std::env::var("BOOTSTRAP_CARGO").unwrap();
5250
let mut cmd = std::process::Command::new(bootstrap_cargo);
5351
cmd.args([
54-
"build",
55-
"--manifest-path",
56-
manifest_path.to_str().unwrap(),
57-
"-Zbuild-std=core",
58-
"--target",
59-
&target,
60-
])
61-
.env_clear()
62-
.env("PATH", path)
63-
.env("RUSTC", rustc)
64-
.env("RUSTFLAGS", "-Copt-level=0 -Cdebug-assertions=yes")
65-
.env("CARGO_TARGET_DIR", &target_dir)
66-
.env("RUSTC_BOOTSTRAP", "1")
67-
// Visual Studio 2022 requires that the LIB env var be set so it can
68-
// find the Windows SDK.
69-
.env("LIB", std::env::var("LIB").unwrap_or_default());
52+
"build",
53+
"--manifest-path",
54+
manifest_path.to_str().unwrap(),
55+
"-Zbuild-std=core",
56+
"--target",
57+
&target,
58+
])
59+
.env_clear()
60+
.env("PATH", path)
61+
.env("RUSTC", rustc)
62+
.env("RUSTFLAGS", "-Copt-level=0 -Cdebug-assertions=yes")
63+
.env("CARGO_TARGET_DIR", &target_dir)
64+
.env("RUSTC_BOOTSTRAP", "1")
65+
// Visual Studio 2022 requires that the LIB env var be set so it can
66+
// find the Windows SDK.
67+
.env("LIB", std::env::var("LIB").unwrap_or_default());
7068
set_host_rpath(&mut cmd);
7169

7270
let status = cmd.status().unwrap();

tests/run-make/core-no-fp-fmt-parse/rmake.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// This test checks that the core library of Rust can be compiled without enabling
22
// support for formatting and parsing floating-point numbers.
33

4-
extern crate run_make_support;
5-
64
use run_make_support::rustc;
75
use std::path::PathBuf;
86

tests/run-make/cross-lang-lto-riscv-abi/rmake.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//! which requires extra `target-abi` metadata to be emitted.
33
//@ needs-matching-clang
44
//@ needs-llvm-components riscv
5-
extern crate run_make_support;
65

76
use run_make_support::{bin_name, clang, llvm_readobj, rustc, tmp_dir};
87
use std::{

tests/run-make/exit-code/rmake.rs

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,25 @@
11
// Test that we exit with the correct exit code for successful / unsuccessful / ICE compilations
22

3-
extern crate run_make_support;
4-
53
use run_make_support::{rustc, rustdoc, tmp_dir};
64

75
fn main() {
8-
rustc()
9-
.arg("success.rs")
10-
.run();
6+
rustc().arg("success.rs").run();
117

12-
rustc()
13-
.arg("--invalid-arg-foo")
14-
.run_fail_assert_exit_code(1);
8+
rustc().arg("--invalid-arg-foo").run_fail_assert_exit_code(1);
159

16-
rustc()
17-
.arg("compile-error.rs")
18-
.run_fail_assert_exit_code(1);
10+
rustc().arg("compile-error.rs").run_fail_assert_exit_code(1);
1911

2012
rustc()
2113
.env("RUSTC_ICE", "0")
2214
.arg("-Ztreat-err-as-bug")
2315
.arg("compile-error.rs")
2416
.run_fail_assert_exit_code(101);
2517

26-
rustdoc()
27-
.arg("success.rs")
28-
.arg("-o")
29-
.arg(tmp_dir().join("exit-code"))
30-
.run();
18+
rustdoc().arg("success.rs").arg("-o").arg(tmp_dir().join("exit-code")).run();
3119

32-
rustdoc()
33-
.arg("--invalid-arg-foo")
34-
.run_fail_assert_exit_code(1);
20+
rustdoc().arg("--invalid-arg-foo").run_fail_assert_exit_code(1);
3521

36-
rustdoc()
37-
.arg("compile-error.rs")
38-
.run_fail_assert_exit_code(1);
22+
rustdoc().arg("compile-error.rs").run_fail_assert_exit_code(1);
3923

40-
rustdoc()
41-
.arg("lint-failure.rs")
42-
.run_fail_assert_exit_code(1);
24+
rustdoc().arg("lint-failure.rs").run_fail_assert_exit_code(1);
4325
}

tests/run-make/issue-107495-archive-permissions/rmake.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#[cfg(unix)]
44
extern crate libc;
5-
extern crate run_make_support;
65

76
use run_make_support::{aux_build, tmp_dir};
87
use std::fs;

0 commit comments

Comments
 (0)