From 09aa77299b473533335f7d49f43f096645253ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=C3=B3n=20Orell=20Valerian=20Liehr?= Date: Thu, 2 May 2024 17:57:23 +0200 Subject: [PATCH] Cleanup: Rid the `rmake` test runners of `extern crate run_make_support;` --- tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs | 2 -- tests/run-make/a-b-a-linker-guard/rmake.rs | 2 -- tests/run-make/arguments-non-c-like-enum/rmake.rs | 2 -- tests/run-make/artifact-incr-cache-no-obj/rmake.rs | 2 -- tests/run-make/artifact-incr-cache/rmake.rs | 2 -- tests/run-make/compiler-builtins/rmake.rs | 2 -- tests/run-make/core-no-fp-fmt-parse/rmake.rs | 2 -- tests/run-make/cross-lang-lto-riscv-abi/rmake.rs | 1 - tests/run-make/exit-code/rmake.rs | 2 -- tests/run-make/issue-107495-archive-permissions/rmake.rs | 1 - tests/run-make/no-input-file/rmake.rs | 2 -- tests/run-make/non-unicode-env/rmake.rs | 2 -- tests/run-make/non-unicode-in-incremental-dir/rmake.rs | 2 -- tests/run-make/print-cfg/rmake.rs | 2 -- tests/run-make/print-native-static-libs/rmake.rs | 2 -- tests/run-make/print-to-output/rmake.rs | 2 -- tests/run-make/repr128-dwarf/rmake.rs | 2 -- tests/run-make/rust-lld-custom-target/rmake.rs | 2 -- tests/run-make/rust-lld/rmake.rs | 2 -- tests/run-make/rustdoc-test-args/rmake.rs | 2 -- tests/run-make/wasm-abi/rmake.rs | 2 -- tests/run-make/wasm-custom-section/rmake.rs | 1 - tests/run-make/wasm-custom-sections-opt/rmake.rs | 1 - tests/run-make/wasm-export-all-symbols/rmake.rs | 2 -- tests/run-make/wasm-import-module/rmake.rs | 2 -- tests/run-make/wasm-panic-small/rmake.rs | 2 -- tests/run-make/wasm-spurious-import/rmake.rs | 2 -- tests/run-make/wasm-stringify-ints-small/rmake.rs | 2 -- tests/run-make/wasm-symbols-different-module/rmake.rs | 1 - tests/run-make/wasm-symbols-not-exported/rmake.rs | 1 - tests/run-make/wasm-symbols-not-imported/rmake.rs | 1 - 31 files changed, 55 deletions(-) diff --git a/tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs b/tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs index 1204260a2f46f..fe0ceaf6b043d 100644 --- a/tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs +++ b/tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs @@ -3,8 +3,6 @@ // Check that the `CURRENT_RUSTC_VERSION` placeholder is correctly replaced by the current // `rustc` version and the `since` property in feature stability gating is properly respected. -extern crate run_make_support; - use std::path::PathBuf; use run_make_support::{rustc, aux_build}; diff --git a/tests/run-make/a-b-a-linker-guard/rmake.rs b/tests/run-make/a-b-a-linker-guard/rmake.rs index ffc1b2000b90c..ee6d655bc760c 100644 --- a/tests/run-make/a-b-a-linker-guard/rmake.rs +++ b/tests/run-make/a-b-a-linker-guard/rmake.rs @@ -3,8 +3,6 @@ // Test that if we build `b` against a version of `a` that has one set of types, it will not run // with a dylib that has a different set of types. -extern crate run_make_support; - use run_make_support::{run, run_fail, rustc}; fn main() { diff --git a/tests/run-make/arguments-non-c-like-enum/rmake.rs b/tests/run-make/arguments-non-c-like-enum/rmake.rs index 624a7fb22518d..13230206ca877 100644 --- a/tests/run-make/arguments-non-c-like-enum/rmake.rs +++ b/tests/run-make/arguments-non-c-like-enum/rmake.rs @@ -1,8 +1,6 @@ //! Check that non-trivial `repr(C)` enum in Rust has valid C layout. //@ ignore-cross-compile -extern crate run_make_support; - use run_make_support::{cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib}; pub fn main() { diff --git a/tests/run-make/artifact-incr-cache-no-obj/rmake.rs b/tests/run-make/artifact-incr-cache-no-obj/rmake.rs index de55de2a1ee20..6613698ae1dfe 100644 --- a/tests/run-make/artifact-incr-cache-no-obj/rmake.rs +++ b/tests/run-make/artifact-incr-cache-no-obj/rmake.rs @@ -5,8 +5,6 @@ // // Fixes: rust-lang/rust#123234 -extern crate run_make_support; - use run_make_support::{rustc, tmp_dir}; fn main() { diff --git a/tests/run-make/artifact-incr-cache/rmake.rs b/tests/run-make/artifact-incr-cache/rmake.rs index bb6513680818a..106f363eb8da1 100644 --- a/tests/run-make/artifact-incr-cache/rmake.rs +++ b/tests/run-make/artifact-incr-cache/rmake.rs @@ -7,8 +7,6 @@ // Also see discussion at // -extern crate run_make_support; - use run_make_support::{rustc, tmp_dir}; fn main() { diff --git a/tests/run-make/compiler-builtins/rmake.rs b/tests/run-make/compiler-builtins/rmake.rs index 97ff12877f10a..1784784845995 100644 --- a/tests/run-make/compiler-builtins/rmake.rs +++ b/tests/run-make/compiler-builtins/rmake.rs @@ -14,8 +14,6 @@ #![deny(warnings)] -extern crate run_make_support; - use run_make_support::object; use run_make_support::object::read::archive::ArchiveFile; use run_make_support::object::read::Object; diff --git a/tests/run-make/core-no-fp-fmt-parse/rmake.rs b/tests/run-make/core-no-fp-fmt-parse/rmake.rs index 2748d4359c365..e3484888ca5a2 100644 --- a/tests/run-make/core-no-fp-fmt-parse/rmake.rs +++ b/tests/run-make/core-no-fp-fmt-parse/rmake.rs @@ -1,8 +1,6 @@ // This test checks that the core library of Rust can be compiled without enabling // support for formatting and parsing floating-point numbers. -extern crate run_make_support; - use run_make_support::rustc; use std::path::PathBuf; diff --git a/tests/run-make/cross-lang-lto-riscv-abi/rmake.rs b/tests/run-make/cross-lang-lto-riscv-abi/rmake.rs index b534a99f8cfee..61f32762d8b71 100644 --- a/tests/run-make/cross-lang-lto-riscv-abi/rmake.rs +++ b/tests/run-make/cross-lang-lto-riscv-abi/rmake.rs @@ -2,7 +2,6 @@ //! which requires extra `target-abi` metadata to be emitted. //@ needs-matching-clang //@ needs-llvm-components riscv -extern crate run_make_support; use run_make_support::{bin_name, clang, llvm_readobj, rustc, tmp_dir}; use std::{ diff --git a/tests/run-make/exit-code/rmake.rs b/tests/run-make/exit-code/rmake.rs index f387626287e3f..f4ceabe126cbf 100644 --- a/tests/run-make/exit-code/rmake.rs +++ b/tests/run-make/exit-code/rmake.rs @@ -1,7 +1,5 @@ // Test that we exit with the correct exit code for successful / unsuccessful / ICE compilations -extern crate run_make_support; - use run_make_support::{rustc, rustdoc, tmp_dir}; fn main() { diff --git a/tests/run-make/issue-107495-archive-permissions/rmake.rs b/tests/run-make/issue-107495-archive-permissions/rmake.rs index 40deabe15b73c..db25e9b033c13 100644 --- a/tests/run-make/issue-107495-archive-permissions/rmake.rs +++ b/tests/run-make/issue-107495-archive-permissions/rmake.rs @@ -2,7 +2,6 @@ #[cfg(unix)] extern crate libc; -extern crate run_make_support; use run_make_support::{aux_build, tmp_dir}; use std::fs; diff --git a/tests/run-make/no-input-file/rmake.rs b/tests/run-make/no-input-file/rmake.rs index 26df7e80dfbff..15e582311f09c 100644 --- a/tests/run-make/no-input-file/rmake.rs +++ b/tests/run-make/no-input-file/rmake.rs @@ -1,5 +1,3 @@ -extern crate run_make_support; - use run_make_support::{diff, rustc}; fn main() { diff --git a/tests/run-make/non-unicode-env/rmake.rs b/tests/run-make/non-unicode-env/rmake.rs index ba4aa1609b56c..a4843a52efd5b 100644 --- a/tests/run-make/non-unicode-env/rmake.rs +++ b/tests/run-make/non-unicode-env/rmake.rs @@ -1,5 +1,3 @@ -extern crate run_make_support; - use run_make_support::rustc; fn main() { diff --git a/tests/run-make/non-unicode-in-incremental-dir/rmake.rs b/tests/run-make/non-unicode-in-incremental-dir/rmake.rs index 129e424f27a41..40152e0411d39 100644 --- a/tests/run-make/non-unicode-in-incremental-dir/rmake.rs +++ b/tests/run-make/non-unicode-in-incremental-dir/rmake.rs @@ -1,5 +1,3 @@ -extern crate run_make_support; - use run_make_support::{rustc, tmp_dir}; fn main() { diff --git a/tests/run-make/print-cfg/rmake.rs b/tests/run-make/print-cfg/rmake.rs index 71db7b8a6937e..6e72c16f1f9a9 100644 --- a/tests/run-make/print-cfg/rmake.rs +++ b/tests/run-make/print-cfg/rmake.rs @@ -5,8 +5,6 @@ //! //! It also checks that some targets have the correct set cfgs. -extern crate run_make_support; - use std::collections::HashSet; use std::ffi::OsString; use std::io::BufRead; diff --git a/tests/run-make/print-native-static-libs/rmake.rs b/tests/run-make/print-native-static-libs/rmake.rs index fc8701777d123..5249920cc60e5 100644 --- a/tests/run-make/print-native-static-libs/rmake.rs +++ b/tests/run-make/print-native-static-libs/rmake.rs @@ -12,8 +12,6 @@ //@ ignore-cross-compile //@ ignore-wasm -extern crate run_make_support; - use std::io::BufRead; use run_make_support::{rustc, is_msvc}; diff --git a/tests/run-make/print-to-output/rmake.rs b/tests/run-make/print-to-output/rmake.rs index 8595a0c490b34..f710d0dc3c9b5 100644 --- a/tests/run-make/print-to-output/rmake.rs +++ b/tests/run-make/print-to-output/rmake.rs @@ -1,8 +1,6 @@ //! This checks the output of some `--print` options when //! output to a file (instead of stdout) -extern crate run_make_support; - use std::ffi::OsString; use run_make_support::{rustc, target, tmp_dir}; diff --git a/tests/run-make/repr128-dwarf/rmake.rs b/tests/run-make/repr128-dwarf/rmake.rs index f6375344f8f28..d734b2add79a2 100644 --- a/tests/run-make/repr128-dwarf/rmake.rs +++ b/tests/run-make/repr128-dwarf/rmake.rs @@ -1,8 +1,6 @@ //@ ignore-windows // This test should be replaced with one in tests/debuginfo once GDB or LLDB support 128-bit enums. -extern crate run_make_support; - use gimli::{AttributeValue, Dwarf, EndianRcSlice, Reader, RunTimeEndian}; use object::{Object, ObjectSection}; use run_make_support::{gimli, object, rustc, tmp_dir}; diff --git a/tests/run-make/rust-lld-custom-target/rmake.rs b/tests/run-make/rust-lld-custom-target/rmake.rs index b5341725e36ea..9bdb69f47d8ec 100644 --- a/tests/run-make/rust-lld-custom-target/rmake.rs +++ b/tests/run-make/rust-lld-custom-target/rmake.rs @@ -8,8 +8,6 @@ //@ needs-rust-lld //@ only-x86_64-unknown-linux-gnu -extern crate run_make_support; - use run_make_support::regex::Regex; use run_make_support::rustc; use std::process::Output; diff --git a/tests/run-make/rust-lld/rmake.rs b/tests/run-make/rust-lld/rmake.rs index acb6d74aaa8be..feeb82e709e16 100644 --- a/tests/run-make/rust-lld/rmake.rs +++ b/tests/run-make/rust-lld/rmake.rs @@ -5,8 +5,6 @@ //@ ignore-msvc //@ ignore-s390x lld does not yet support s390x as target -extern crate run_make_support; - use run_make_support::regex::Regex; use run_make_support::rustc; use std::process::Output; diff --git a/tests/run-make/rustdoc-test-args/rmake.rs b/tests/run-make/rustdoc-test-args/rmake.rs index c8edfb6370e50..66f3f7cf131c7 100644 --- a/tests/run-make/rustdoc-test-args/rmake.rs +++ b/tests/run-make/rustdoc-test-args/rmake.rs @@ -1,5 +1,3 @@ -extern crate run_make_support; - use run_make_support::{rustdoc, tmp_dir}; use std::path::Path; use std::{fs, iter}; diff --git a/tests/run-make/wasm-abi/rmake.rs b/tests/run-make/wasm-abi/rmake.rs index d83332f6e0341..a2dcafbbe0f14 100644 --- a/tests/run-make/wasm-abi/rmake.rs +++ b/tests/run-make/wasm-abi/rmake.rs @@ -1,8 +1,6 @@ //@ only-wasm32-wasip1 //@ needs-wasmtime -extern crate run_make_support; - use run_make_support::{rustc, tmp_dir}; use std::path::Path; use std::process::Command; diff --git a/tests/run-make/wasm-custom-section/rmake.rs b/tests/run-make/wasm-custom-section/rmake.rs index 825fcf71514c6..0303ca05ca631 100644 --- a/tests/run-make/wasm-custom-section/rmake.rs +++ b/tests/run-make/wasm-custom-section/rmake.rs @@ -1,5 +1,4 @@ //@ only-wasm32-wasip1 -extern crate run_make_support; use run_make_support::{rustc, tmp_dir, wasmparser}; use std::collections::HashMap; diff --git a/tests/run-make/wasm-custom-sections-opt/rmake.rs b/tests/run-make/wasm-custom-sections-opt/rmake.rs index 634683adc220d..24570d8baf5a6 100644 --- a/tests/run-make/wasm-custom-sections-opt/rmake.rs +++ b/tests/run-make/wasm-custom-sections-opt/rmake.rs @@ -1,5 +1,4 @@ //@ only-wasm32-wasip1 -extern crate run_make_support; use run_make_support::{tmp_dir, wasmparser, rustc}; use std::collections::HashMap; diff --git a/tests/run-make/wasm-export-all-symbols/rmake.rs b/tests/run-make/wasm-export-all-symbols/rmake.rs index 400d6db5651c1..50c99d027d5ac 100644 --- a/tests/run-make/wasm-export-all-symbols/rmake.rs +++ b/tests/run-make/wasm-export-all-symbols/rmake.rs @@ -1,7 +1,5 @@ //@ only-wasm32-wasip1 -extern crate run_make_support; - use run_make_support::{tmp_dir, wasmparser, rustc}; use std::collections::HashMap; use std::path::Path; diff --git a/tests/run-make/wasm-import-module/rmake.rs b/tests/run-make/wasm-import-module/rmake.rs index 1b814e9ccce30..333d0df4653fa 100644 --- a/tests/run-make/wasm-import-module/rmake.rs +++ b/tests/run-make/wasm-import-module/rmake.rs @@ -1,7 +1,5 @@ //@ only-wasm32-wasip1 -extern crate run_make_support; - use run_make_support::{tmp_dir, wasmparser, rustc}; use std::collections::HashMap; use wasmparser::TypeRef::Func; diff --git a/tests/run-make/wasm-panic-small/rmake.rs b/tests/run-make/wasm-panic-small/rmake.rs index bffa311d93a11..373b966401cea 100644 --- a/tests/run-make/wasm-panic-small/rmake.rs +++ b/tests/run-make/wasm-panic-small/rmake.rs @@ -1,8 +1,6 @@ //@ only-wasm32-wasip1 #![deny(warnings)] -extern crate run_make_support; - use run_make_support::{rustc, tmp_dir}; fn main() { diff --git a/tests/run-make/wasm-spurious-import/rmake.rs b/tests/run-make/wasm-spurious-import/rmake.rs index 8f716061d28ba..458c7bfccb74a 100644 --- a/tests/run-make/wasm-spurious-import/rmake.rs +++ b/tests/run-make/wasm-spurious-import/rmake.rs @@ -1,7 +1,5 @@ //@ only-wasm32-wasip1 -extern crate run_make_support; - use run_make_support::{rustc, tmp_dir, wasmparser}; use std::collections::HashMap; diff --git a/tests/run-make/wasm-stringify-ints-small/rmake.rs b/tests/run-make/wasm-stringify-ints-small/rmake.rs index 5efbfee8d3834..9fac0c0c215d0 100644 --- a/tests/run-make/wasm-stringify-ints-small/rmake.rs +++ b/tests/run-make/wasm-stringify-ints-small/rmake.rs @@ -1,8 +1,6 @@ //@ only-wasm32-wasip1 #![deny(warnings)] -extern crate run_make_support; - use run_make_support::{rustc, tmp_dir}; fn main() { diff --git a/tests/run-make/wasm-symbols-different-module/rmake.rs b/tests/run-make/wasm-symbols-different-module/rmake.rs index 88bd16a404c70..521d2c31ee61c 100644 --- a/tests/run-make/wasm-symbols-different-module/rmake.rs +++ b/tests/run-make/wasm-symbols-different-module/rmake.rs @@ -1,5 +1,4 @@ //@ only-wasm32-wasip1 -extern crate run_make_support; use run_make_support::{rustc, tmp_dir, wasmparser}; use std::collections::{HashMap, HashSet}; diff --git a/tests/run-make/wasm-symbols-not-exported/rmake.rs b/tests/run-make/wasm-symbols-not-exported/rmake.rs index c9207f70ae5f2..1b020b67a3852 100644 --- a/tests/run-make/wasm-symbols-not-exported/rmake.rs +++ b/tests/run-make/wasm-symbols-not-exported/rmake.rs @@ -1,5 +1,4 @@ //@ only-wasm32-wasip1 -extern crate run_make_support; use run_make_support::{rustc, tmp_dir, wasmparser}; use std::path::Path; diff --git a/tests/run-make/wasm-symbols-not-imported/rmake.rs b/tests/run-make/wasm-symbols-not-imported/rmake.rs index 4d41dc7c0aa8f..a653ab61b2c00 100644 --- a/tests/run-make/wasm-symbols-not-imported/rmake.rs +++ b/tests/run-make/wasm-symbols-not-imported/rmake.rs @@ -1,5 +1,4 @@ //@ only-wasm32-wasip1 -extern crate run_make_support; use run_make_support::{rustc, tmp_dir, wasmparser}; use std::path::Path;