diff --git a/tests/run-make/dump-ice-to-disk/rmake.rs b/tests/run-make/dump-ice-to-disk/rmake.rs index 15f35eb2d3d88..a7a98d31f5046 100644 --- a/tests/run-make/dump-ice-to-disk/rmake.rs +++ b/tests/run-make/dump-ice-to-disk/rmake.rs @@ -83,7 +83,7 @@ fn extract_exactly_one_ice_file>(name: &'static str, dir: P) -> I fn main() { // Establish baseline ICE message. - let mut default_ice_dump = OnceCell::new(); + let default_ice_dump = OnceCell::new(); run_in_tmpdir(|| { rustc().env("RUSTC_ICE", cwd()).input("lib.rs").arg("-Ztreat-err-as-bug=1").run_fail(); let dump = extract_exactly_one_ice_file("baseline", cwd()); diff --git a/tests/run-make/embed-source-dwarf/rmake.rs b/tests/run-make/embed-source-dwarf/rmake.rs index c7106967a85eb..0aae07ff2e647 100644 --- a/tests/run-make/embed-source-dwarf/rmake.rs +++ b/tests/run-make/embed-source-dwarf/rmake.rs @@ -10,7 +10,7 @@ use std::collections::HashMap; use std::path::PathBuf; use std::rc::Rc; -use gimli::{AttributeValue, EndianRcSlice, Reader, RunTimeEndian}; +use gimli::{EndianRcSlice, Reader, RunTimeEndian}; use object::{Object, ObjectSection}; use run_make_support::{gimli, object, rfs, rustc}; diff --git a/tests/run-make/import-macro-verbatim/verbatim.rs b/tests/run-make/import-macro-verbatim/verbatim.rs index 56a83673c1f57..0123a4a7e2215 100644 --- a/tests/run-make/import-macro-verbatim/verbatim.rs +++ b/tests/run-make/import-macro-verbatim/verbatim.rs @@ -1,4 +1,4 @@ -//! Include a file by concating the verbatim path using `/` instead of `\` +//! Include a file by concatenating the verbatim path using `/` instead of `\` include!(concat!(env!("VERBATIM_DIR"), "/include/include.txt")); fn main() { diff --git a/tests/run-make/libstd-no-protected/rmake.rs b/tests/run-make/libstd-no-protected/rmake.rs index 3bba59a8f4d55..4091406d46e29 100644 --- a/tests/run-make/libstd-no-protected/rmake.rs +++ b/tests/run-make/libstd-no-protected/rmake.rs @@ -7,7 +7,7 @@ use run_make_support::object::Endianness; use run_make_support::object::read::archive::ArchiveFile; use run_make_support::object::read::elf::{FileHeader as _, SectionHeader as _}; -use run_make_support::rfs::{read, read_dir}; +use run_make_support::rfs::read; use run_make_support::{has_prefix, has_suffix, object, path, rustc, shallow_find_files, target}; type FileHeader = run_make_support::object::elf::FileHeader64; diff --git a/tests/run-make/libtest-thread-limit/rmake.rs b/tests/run-make/libtest-thread-limit/rmake.rs index fe14d2c046cca..817328cd3c3eb 100644 --- a/tests/run-make/libtest-thread-limit/rmake.rs +++ b/tests/run-make/libtest-thread-limit/rmake.rs @@ -15,10 +15,7 @@ // Reason: this should be ignored in cg_clif (Cranelift) CI and anywhere // else that uses panic=abort. -use std::ffi::{self, CStr, CString}; -use std::path::PathBuf; - -use run_make_support::{libc, run, rustc}; +use run_make_support::{libc, rustc}; fn main() { rustc().input("test.rs").arg("--test").run(); diff --git a/tests/run-make/llvm-outputs/rmake.rs b/tests/run-make/llvm-outputs/rmake.rs index 632e9a09ba503..2ce31b260a164 100644 --- a/tests/run-make/llvm-outputs/rmake.rs +++ b/tests/run-make/llvm-outputs/rmake.rs @@ -9,8 +9,8 @@ fn main() { let mut path_ir = PathBuf::new(); run_in_tmpdir(|| { let p = cwd(); - path_bc = p.join("nonexistant_dir_bc"); - path_ir = p.join("nonexistant_dir_ir"); + path_bc = p.join("nonexistent_dir_bc"); + path_ir = p.join("nonexistent_dir_ir"); rustc().input("-").stdin_buf("fn main() {}").out_dir(&path_bc).emit("llvm-bc").run(); rustc().input("-").stdin_buf("fn main() {}").out_dir(&path_ir).emit("llvm-ir").run(); assert!(path_bc.exists()); diff --git a/tests/run-make/missing-unstable-trait-bound/rmake.rs b/tests/run-make/missing-unstable-trait-bound/rmake.rs index 20f77f7c9aa0d..3f76c65247d8c 100644 --- a/tests/run-make/missing-unstable-trait-bound/rmake.rs +++ b/tests/run-make/missing-unstable-trait-bound/rmake.rs @@ -6,7 +6,7 @@ // Ensure that on stable we don't suggest restricting with an unsafe trait and we continue // mentioning the rest of the obligation chain. -use run_make_support::{diff, rust_lib_name, rustc}; +use run_make_support::{diff, rustc}; fn main() { let out = rustc() diff --git a/tests/run-make/musl-default-linking/rmake.rs b/tests/run-make/musl-default-linking/rmake.rs index b6d428d3f2716..d203595a44741 100644 --- a/tests/run-make/musl-default-linking/rmake.rs +++ b/tests/run-make/musl-default-linking/rmake.rs @@ -48,7 +48,7 @@ fn main() { let default = &target_spec["crt-static-default"]; // If the value is `null`, then the default to dynamically link from - // musl_base was not overriden. + // musl_base was not overridden. if default.is_null() { continue; } diff --git a/tests/run-make/no-alloc-shim/rmake.rs b/tests/run-make/no-alloc-shim/rmake.rs index c398a3177df63..d61ef5de8c56c 100644 --- a/tests/run-make/no-alloc-shim/rmake.rs +++ b/tests/run-make/no-alloc-shim/rmake.rs @@ -13,7 +13,7 @@ // Tracking issue: https://github.com/rust-lang/rust/issues/128602 // Discussion: https://github.com/rust-lang/rust/pull/128407#discussion_r1702439172 -use run_make_support::{cc, cwd, has_extension, has_prefix, run, rustc, shallow_find_files}; +use run_make_support::{cc, has_extension, has_prefix, run, rustc, shallow_find_files}; fn main() { rustc().input("foo.rs").crate_type("bin").emit("obj").panic("abort").run(); diff --git a/tests/run-make/no-builtins-lto/rmake.rs b/tests/run-make/no-builtins-lto/rmake.rs index 8e0c3a636490f..56fdfde42f04d 100644 --- a/tests/run-make/no-builtins-lto/rmake.rs +++ b/tests/run-make/no-builtins-lto/rmake.rs @@ -1,4 +1,4 @@ -// The rlib produced by a no_builtins crate should be explicitely linked +// The rlib produced by a no_builtins crate should be explicitly linked // during compilation, and as a result be present in the linker arguments. // See the comments inside this file for more details. // See https://github.com/rust-lang/rust/pull/35637 diff --git a/tests/run-make/remove-dir-all-race/rmake.rs b/tests/run-make/remove-dir-all-race/rmake.rs index 03c94b76127d5..32abca92424d6 100644 --- a/tests/run-make/remove-dir-all-race/rmake.rs +++ b/tests/run-make/remove-dir-all-race/rmake.rs @@ -1,13 +1,13 @@ //@ ignore-windows // This test attempts to make sure that running `remove_dir_all` -// doesn't result in a NotFound error one of the files it +// doesn't result in a NotFound error if one of the files it // is deleting is deleted concurrently. // // The windows implementation for `remove_dir_all` is significantly // more complicated, and has not yet been brought up to par with // the implementation on other platforms, so this test is marked as -// `ignore-windows` until someone more expirenced with windows can +// `ignore-windows` until someone more experienced with windows can // sort that out. use std::fs::remove_dir_all; @@ -27,13 +27,12 @@ fn main() { write("outer/inner.txt", b"sometext"); thread::scope(|scope| { - let t1 = scope.spawn(|| { + scope.spawn(|| { thread::sleep(Duration::from_nanos(i)); remove_dir_all("outer").unwrap(); }); - let race_happened_ref = &race_happened; - let t2 = scope.spawn(|| { + scope.spawn(|| { let r1 = remove_dir_all("outer/inner"); let r2 = remove_dir_all("outer/inner.txt"); if r1.is_ok() && r2.is_err() { @@ -44,10 +43,10 @@ fn main() { assert!(!Path::new("outer").exists()); - // trying to remove a nonexistant top-level directory should + // trying to remove a nonexistent top-level directory should // still result in an error. let Err(err) = remove_dir_all("outer") else { - panic!("removing nonexistant dir did not result in an error"); + panic!("removing nonexistent dir did not result in an error"); }; assert_eq!(err.kind(), std::io::ErrorKind::NotFound); } diff --git a/tests/run-make/rustdoc-map-file/rmake.rs b/tests/run-make/rustdoc-map-file/rmake.rs index d7e3510fe31e0..50dcc603c02f2 100644 --- a/tests/run-make/rustdoc-map-file/rmake.rs +++ b/tests/run-make/rustdoc-map-file/rmake.rs @@ -1,8 +1,6 @@ // This test ensures that all items from `foo` are correctly generated into the `redirect-map.json` // file with `--generate-redirect-map` rustdoc option. -use std::path::Path; - use run_make_support::rfs::read_to_string; use run_make_support::{path, rustdoc, serde_json}; diff --git a/tests/run-make/rustdoc-output-stdout/rmake.rs b/tests/run-make/rustdoc-output-stdout/rmake.rs index bcf5e4d97239f..d2fd045116354 100644 --- a/tests/run-make/rustdoc-output-stdout/rmake.rs +++ b/tests/run-make/rustdoc-output-stdout/rmake.rs @@ -1,8 +1,6 @@ // This test verifies that rustdoc `-o -` prints JSON on stdout and doesn't generate // a JSON file. -use std::path::PathBuf; - use run_make_support::path_helpers::{cwd, has_extension, read_dir_entries_recursive}; use run_make_support::{rustdoc, serde_json}; diff --git a/tests/run-make/symbol-visibility/rmake.rs b/tests/run-make/symbol-visibility/rmake.rs index f84e63ef74e8d..ec936bc3b07fa 100644 --- a/tests/run-make/symbol-visibility/rmake.rs +++ b/tests/run-make/symbol-visibility/rmake.rs @@ -1,7 +1,7 @@ // Dynamic libraries on Rust used to export a very high amount of symbols, // going as far as filling the output with mangled names and generic function // names. After the rework of #38117, this test checks that no mangled Rust symbols -// are exported, and that generics are only shown if explicitely requested. +// are exported, and that generics are only shown if explicitly requested. // See https://github.com/rust-lang/rust/issues/37530 use run_make_support::object::read::Object;