From c3a606237d9c01e4622b267031596bf632567e6f Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Tue, 21 May 2024 20:12:07 -0400 Subject: PR feedback --- compiler/rustc_driver_impl/src/lib.rs | 2 +- compiler/rustc_driver_impl/src/session_diagnostics.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_driver_impl/src') diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 30cc41ecea0..5532eff7be6 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -654,7 +654,7 @@ fn process_rlink(sess: &Session, compiler: &interface::Compiler) { }) } CodegenErrors::CorruptFile => { - dcx.emit_fatal(RlinkCorruptFile { file: file.display().to_string() }); + dcx.emit_fatal(RlinkCorruptFile { file }); } }; } diff --git a/compiler/rustc_driver_impl/src/session_diagnostics.rs b/compiler/rustc_driver_impl/src/session_diagnostics.rs index 864b122233a..449878f28c4 100644 --- a/compiler/rustc_driver_impl/src/session_diagnostics.rs +++ b/compiler/rustc_driver_impl/src/session_diagnostics.rs @@ -34,8 +34,8 @@ pub(crate) struct RlinkNotAFile; #[derive(Diagnostic)] #[diag(driver_impl_rlink_corrupt_file)] -pub(crate) struct RlinkCorruptFile { - pub file: String, +pub(crate) struct RlinkCorruptFile<'a> { + pub file: &'a std::path::Path, } #[derive(Diagnostic)] -- cgit 1.4.1-3-g733a5