From c5e4b72a4183f6fd78f31a228898f5e8595cef3e Mon Sep 17 00:00:00 2001
From: Integral <integral@member.fsf.org>
Date: Fri, 27 Dec 2024 16:36:48 +0800
Subject: [PATCH] tools: fix build failure caused by PR #134420

---
 src/tools/rustc-perf-wrapper/src/main.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tools/rustc-perf-wrapper/src/main.rs b/src/tools/rustc-perf-wrapper/src/main.rs
index 0b4c894e29d9b..e6c885e23deeb 100644
--- a/src/tools/rustc-perf-wrapper/src/main.rs
+++ b/src/tools/rustc-perf-wrapper/src/main.rs
@@ -1,5 +1,5 @@
 use std::fs::create_dir_all;
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
 use std::process::Command;
 
 use clap::Parser;
@@ -169,7 +169,7 @@ fn execute_benchmark(cmd: &mut Command, compiler: &Path) {
 
     const MANIFEST_DIR: &str = env!("CARGO_MANIFEST_DIR");
 
-    let rustc_perf_dir = PathBuf::from(MANIFEST_DIR).join("../rustc-perf");
+    let rustc_perf_dir = Path::new(MANIFEST_DIR).join("../rustc-perf");
 
     // We need to set the working directory to `src/tools/perf`, so that it can find the directory
     // with compile-time benchmarks.