google / pdl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use relative file path in `pdl` proc macro attribute

hchataing opened this issue · comments

The API Span::source_file is currently nightly (https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.source_file), and there is no alternate way to get the path to the file a proc macro attribute runs on.
This means the pdl proc_macro attribute cannot use a relative file path similarly to include_str!.
This should be updated when the API becomes stable.