Skip to content
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

Merged
merged 5 commits into from
Apr 11, 2018

Conversation

hcpl
Copy link
Contributor

@hcpl hcpl commented Apr 4, 2018

No description provided.

@@ -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());
Copy link
Contributor Author

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?

@withoutboats
Copy link

This looks good, just had github rebase it and will merge if its green :)

@withoutboats
Copy link

It looks like nightly has changed a bit more in the past week and there's a bit more needed to get this green.

@hcpl
Copy link
Contributor Author

hcpl commented Apr 11, 2018

Ouch, forgot to rebuild this when rust-lang/rust#49597 got merged. Will fix that!

@withoutboats withoutboats merged commit b7731ce into rust-lang:master Apr 11, 2018
@withoutboats
Copy link

Thanks! Looks good ❤️

@hcpl hcpl deleted the update-syn-quote-proc-macro2 branch May 21, 2018 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants