From 8d8d7021c6006481728775ac4db170af05cf161d Mon Sep 17 00:00:00 2001 From: Skgland Date: Wed, 26 Nov 2025 21:43:44 +0100 Subject: [PATCH] change proc_macro::tracked::path to take an AsRef instead of an AsRef --- library/proc_macro/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index ee224ceb6045..cb9e53780b04 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -1604,6 +1604,7 @@ pub mod tracked { use std::env::{self, VarError}; use std::ffi::OsStr; + use std::path::Path; /// Retrieve an environment variable and add it to build dependency info. /// The build system executing the compiler will know that the variable was accessed during @@ -1623,8 +1624,8 @@ pub mod tracked { /// /// Commonly used for tracking asset preprocessing. #[unstable(feature = "proc_macro_tracked_path", issue = "99515")] - pub fn path>(path: P) { - let path: &str = path.as_ref(); + pub fn path>(path: P) { + let path: &str = path.as_ref().to_str().unwrap(); crate::bridge::client::FreeFunctions::track_path(path); } }