diff options
| author | Integral <integral@member.fsf.org> | 2024-12-18 00:28:34 +0800 |
|---|---|---|
| committer | Integral <integral@member.fsf.org> | 2024-12-18 00:28:34 +0800 |
| commit | 7eb0d8442444897395d5ac167860f710a2842205 (patch) | |
| tree | 6866058996d0f57706f82d6c2651e1f42d07fc2e /compiler/rustc_driver_impl | |
| parent | 978c659b72ed7520332a74321dc8accf48b06d94 (diff) | |
refactor: replace &PathBuf with &Path to enhance generality
Diffstat (limited to 'compiler/rustc_driver_impl')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 6f7b943c649..4049905dbe0 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -26,7 +26,7 @@ use std::fmt::Write as _; use std::fs::{self, File}; use std::io::{self, IsTerminal, Read, Write}; use std::panic::{self, PanicHookInfo, catch_unwind}; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::process::{self, Command, Stdio}; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, OnceLock}; @@ -460,7 +460,7 @@ fn run_compiler( }) } -fn dump_feature_usage_metrics(tcxt: TyCtxt<'_>, metrics_dir: &PathBuf) { +fn dump_feature_usage_metrics(tcxt: TyCtxt<'_>, metrics_dir: &Path) { let output_filenames = tcxt.output_filenames(()); let mut metrics_file_name = std::ffi::OsString::from("unstable_feature_usage_metrics-"); let mut metrics_path = output_filenames.with_directory_and_extension(metrics_dir, "json"); |
