From 439082dad38bb1bad53cddc58ead4eeb79f858dd Mon Sep 17 00:00:00 2001 From: Matthew Gordon Date: Sat, 10 May 2025 09:18:22 -0300 Subject: [PATCH] Update to reflect changes to proc_macro I was using the unstable Span::source_file() function which has been removed. Replaced with Span::local_file(). --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 81f835e..b60cfe9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -102,7 +102,7 @@ fn parse_input(token_stream: TokenStream) -> Result .next() .ok_or(Error::from_message("Expected single string literal."))?; - let source_dir = token.span().source_file().path().parent().unwrap().into(); + let source_dir = Path::new(&token.span().local_file().unwrap()).parent().unwrap().into(); let literal: LitStr = parse(token_stream)?; let filename = std::path::Path::new(&literal.value()).into(); Ok(WgslModuleMacroInput {