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().
This commit is contained in:
Matthew Gordon 2025-05-10 09:18:22 -03:00
parent 56c8652c57
commit 439082dad3
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ fn parse_input(token_stream: TokenStream) -> Result<WgslModuleMacroInput, Error>
.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 {