-
Notifications
You must be signed in to change notification settings - Fork 628
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
Update syn
, quote
and proc-macro2
#940
Update syn
, quote
and proc-macro2
#940
Conversation
@@ -573,19 +573,19 @@ if_nightly! { | |||
let mut spans = Tokens::new(); | |||
tokens.to_tokens(&mut spans); | |||
let good_tokens = proc_macro2::TokenStream::from(spans).into_iter().collect::<Vec<_>>(); | |||
let first_span = good_tokens.first().map(|t| t.span).unwrap_or(Span::def_site()); | |||
let last_span = good_tokens.last().map(|t| t.span).unwrap_or(first_span); | |||
let first_span = good_tokens.first().map(|t| t.span()).unwrap_or(Span::call_site()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this really be call_site
or better to make first_last
function to return proc_macro::Span
?
This looks good, just had github rebase it and will merge if its green :) |
It looks like nightly has changed a bit more in the past week and there's a bit more needed to get this green. |
Ouch, forgot to rebuild this when rust-lang/rust#49597 got merged. Will fix that! |
Thanks! Looks good ❤️ |
No description provided.