diff --git a/tests/run-make/prefer-dylib/rmake.rs b/tests/run-make/prefer-dylib/rmake.rs index ad9fd8a15a2c0..5b2b064967386 100644 --- a/tests/run-make/prefer-dylib/rmake.rs +++ b/tests/run-make/prefer-dylib/rmake.rs @@ -2,7 +2,6 @@ use run_make_support::{cwd, dynamic_lib_name, read_dir, run, run_fail, rustc}; use std::fs::remove_file; -use std::process::Command; fn main() { rustc().input("bar.rs").crate_type("dylib").crate_type("rlib").arg("-Cprefer-dynamic").run(); diff --git a/tests/run-make/prefer-rlib/rmake.rs b/tests/run-make/prefer-rlib/rmake.rs index 1d336a0790322..96861a264e621 100644 --- a/tests/run-make/prefer-rlib/rmake.rs +++ b/tests/run-make/prefer-rlib/rmake.rs @@ -3,14 +3,13 @@ //@ ignore-cross-compile -use run_make_support::{dynamic_lib_name, path, run, rust_lib_name, rustc}; -use std::fs::remove_file; +use run_make_support::{dynamic_lib_name, fs_wrapper, path, run, rust_lib_name, rustc}; fn main() { rustc().input("bar.rs").crate_type("dylib").crate_type("rlib").run(); assert!(path(rust_lib_name("bar")).exists()); rustc().input("foo.rs").run(); - remove_file(rust_lib_name("bar")).unwrap(); - remove_file(dynamic_lib_name("bar")).unwrap(); + fs_wrapper::remove_file(rust_lib_name("bar")); + fs_wrapper::remove_file(dynamic_lib_name("bar")); run("foo"); }