From 221701421066fc91eee4c7bde129b607088cf328 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:44:05 +0000 Subject: [PATCH] Apply some suggestions to the test rmake file --- tests/run-make/staticlib-thin-archive/rmake.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/run-make/staticlib-thin-archive/rmake.rs b/tests/run-make/staticlib-thin-archive/rmake.rs index f7e3e43d535..955c50da201 100644 --- a/tests/run-make/staticlib-thin-archive/rmake.rs +++ b/tests/run-make/staticlib-thin-archive/rmake.rs @@ -3,21 +3,16 @@ // archive support rustc would add emit object files to the staticlib and after // the object crate added thin archive support it would previously crash the // compiler due to a missing special case for thin archive members. -use std::path::Path; - -use run_make_support::{llvm_ar, rust_lib_name, rustc, static_lib_name}; +use run_make_support::{llvm_ar, path, rfs, rust_lib_name, rustc, static_lib_name}; fn main() { - std::fs::create_dir("archive").unwrap(); + rfs::create_dir("archive"); // Build a thin archive rustc().input("simple_obj.rs").emit("obj").output("archive/simple_obj.o").run(); llvm_ar() .obj_to_thin_ar() - .output_input( - Path::new("archive").join(static_lib_name("thin_archive")), - "archive/simple_obj.o", - ) + .output_input(path("archive").join(static_lib_name("thin_archive")), "archive/simple_obj.o") .run(); // Build an rlib which includes the members of this thin archive