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:
parent
56c8652c57
commit
439082dad3
|
|
@ -102,7 +102,7 @@ fn parse_input(token_stream: TokenStream) -> Result<WgslModuleMacroInput, Error>
|
||||||
.next()
|
.next()
|
||||||
.ok_or(Error::from_message("Expected single string literal."))?;
|
.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 literal: LitStr = parse(token_stream)?;
|
||||||
let filename = std::path::Path::new(&literal.value()).into();
|
let filename = std::path::Path::new(&literal.value()).into();
|
||||||
Ok(WgslModuleMacroInput {
|
Ok(WgslModuleMacroInput {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue