-
-
Notifications
You must be signed in to change notification settings - Fork 122
Convert Span to proc_macro::Span #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ah yeah currently this isn't done b/c this is functionality which can only be implemented with the |
Either that or a function that returns |
I have some WIP patches to add meaningful spans to the stable version of proc-macro2. It should allow us to expose those APIs from the span wrapper directly. |
Oh nice! Sounds good to me @mystor |
I've actually made these changes in my fork: https://github.com/SergioBenitez/proc-macro2. If these seem reasonable, @alexcrichton, I'd be happy to submit a PR. |
There's some work for this at #36, with the conclusion at the end that what we should change is putting it behind an experimental feature. |
The approach I've taken is a much simpler one: simply expose a method to retrieve a The reasoning here is that this approach relieves users of I don't have any issue with also exposing the shims in #36, however! |
Added in #41 |
Hi.
It would be useful to be able to convert a
proc_macro2::Span
to aproc_macro::Span
.For instance, this will allow to create
Diagnostic
s withSpan
.Thank you to add a
From
implementation forunstable
only or something along these lines.The text was updated successfully, but these errors were encountered: