Skip to content

Commit a16fc10

Browse files
authored
Rollup merge of #134680 - lqd:run-make-cleanup, r=jieyouxu
Clean up a few rmake tests Now I'm aware it's a bit late to start participating in the Advent of Tests, but here are a few cleanups in the rmake tests to put under the 🎄 anyways. A handful of unused imports, some warnings, and a couple typos. r? `@jieyouxu` 🎅
2 parents a62f245 + 6f19bd0 commit a16fc10

File tree

14 files changed

+18
-26
lines changed

14 files changed

+18
-26
lines changed

tests/run-make/dump-ice-to-disk/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn extract_exactly_one_ice_file<P: AsRef<Path>>(name: &'static str, dir: P) -> I
8383

8484
fn main() {
8585
// Establish baseline ICE message.
86-
let mut default_ice_dump = OnceCell::new();
86+
let default_ice_dump = OnceCell::new();
8787
run_in_tmpdir(|| {
8888
rustc().env("RUSTC_ICE", cwd()).input("lib.rs").arg("-Ztreat-err-as-bug=1").run_fail();
8989
let dump = extract_exactly_one_ice_file("baseline", cwd());

tests/run-make/embed-source-dwarf/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::collections::HashMap;
1010
use std::path::PathBuf;
1111
use std::rc::Rc;
1212

13-
use gimli::{AttributeValue, EndianRcSlice, Reader, RunTimeEndian};
13+
use gimli::{EndianRcSlice, Reader, RunTimeEndian};
1414
use object::{Object, ObjectSection};
1515
use run_make_support::{gimli, object, rfs, rustc};
1616

tests/run-make/import-macro-verbatim/verbatim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Include a file by concating the verbatim path using `/` instead of `\`
1+
//! Include a file by concatenating the verbatim path using `/` instead of `\`
22
33
include!(concat!(env!("VERBATIM_DIR"), "/include/include.txt"));
44
fn main() {

tests/run-make/libstd-no-protected/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use run_make_support::object::Endianness;
88
use run_make_support::object::read::archive::ArchiveFile;
99
use run_make_support::object::read::elf::{FileHeader as _, SectionHeader as _};
10-
use run_make_support::rfs::{read, read_dir};
10+
use run_make_support::rfs::read;
1111
use run_make_support::{has_prefix, has_suffix, object, path, rustc, shallow_find_files, target};
1212

1313
type FileHeader = run_make_support::object::elf::FileHeader64<Endianness>;

tests/run-make/libtest-thread-limit/rmake.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
// Reason: this should be ignored in cg_clif (Cranelift) CI and anywhere
1616
// else that uses panic=abort.
1717

18-
use std::ffi::{self, CStr, CString};
19-
use std::path::PathBuf;
20-
21-
use run_make_support::{libc, run, rustc};
18+
use run_make_support::{libc, rustc};
2219

2320
fn main() {
2421
rustc().input("test.rs").arg("--test").run();

tests/run-make/llvm-outputs/rmake.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ fn main() {
99
let mut path_ir = PathBuf::new();
1010
run_in_tmpdir(|| {
1111
let p = cwd();
12-
path_bc = p.join("nonexistant_dir_bc");
13-
path_ir = p.join("nonexistant_dir_ir");
12+
path_bc = p.join("nonexistent_dir_bc");
13+
path_ir = p.join("nonexistent_dir_ir");
1414
rustc().input("-").stdin_buf("fn main() {}").out_dir(&path_bc).emit("llvm-bc").run();
1515
rustc().input("-").stdin_buf("fn main() {}").out_dir(&path_ir).emit("llvm-ir").run();
1616
assert!(path_bc.exists());

tests/run-make/missing-unstable-trait-bound/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Ensure that on stable we don't suggest restricting with an unsafe trait and we continue
77
// mentioning the rest of the obligation chain.
88

9-
use run_make_support::{diff, rust_lib_name, rustc};
9+
use run_make_support::{diff, rustc};
1010

1111
fn main() {
1212
let out = rustc()

tests/run-make/musl-default-linking/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn main() {
4848
let default = &target_spec["crt-static-default"];
4949

5050
// If the value is `null`, then the default to dynamically link from
51-
// musl_base was not overriden.
51+
// musl_base was not overridden.
5252
if default.is_null() {
5353
continue;
5454
}

tests/run-make/no-alloc-shim/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Tracking issue: https://github.com/rust-lang/rust/issues/128602
1414
// Discussion: https://github.com/rust-lang/rust/pull/128407#discussion_r1702439172
1515

16-
use run_make_support::{cc, cwd, has_extension, has_prefix, run, rustc, shallow_find_files};
16+
use run_make_support::{cc, has_extension, has_prefix, run, rustc, shallow_find_files};
1717

1818
fn main() {
1919
rustc().input("foo.rs").crate_type("bin").emit("obj").panic("abort").run();

tests/run-make/no-builtins-lto/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// The rlib produced by a no_builtins crate should be explicitely linked
1+
// The rlib produced by a no_builtins crate should be explicitly linked
22
// during compilation, and as a result be present in the linker arguments.
33
// See the comments inside this file for more details.
44
// See https://github.com/rust-lang/rust/pull/35637

0 commit comments

Comments
 (0)