about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-12-27 20:44:15 +0800
committerGitHub <noreply@github.com>2024-12-27 20:44:15 +0800
commitf65dc4f3759222b7cb7c73dfd1542dc16750d082 (patch)
tree21d1f9fcd7f20482d15835f7379afd8c9c86dab0
parent3980cc65219df807601e8ac325f67cfab55b11e7 (diff)
parentc5e4b72a4183f6fd78f31a228898f5e8595cef3e (diff)
Rollup merge of #134816 - Integral-Tech:pathbuf-refactor, r=lqd
tools: fix build failure caused by PR #134420

Someone reports build failure after merging pull request #134420: https://github.com/rust-lang/rust/pull/134420#discussion_r1898081258

This pull request fixes the build failure.
-rw-r--r--src/tools/rustc-perf-wrapper/src/main.rs4
1 files 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 0b4c894e29d..e6c885e23de 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.