-
Notifications
You must be signed in to change notification settings - Fork 61
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 to Rust 2018, syn/quote/proc-macro2 1.0 #177
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Trying to figure out why the 1.31 test passes locally but fails in CI... |
shepmaster
reviewed
Sep 24, 2019
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.
Looks great, as usual. Just a few minor nits
tjkirch
force-pushed
the
upgrade-minimum
branch
from
September 24, 2019 14:15
15b2f1e
to
d12b1fa
Compare
shepmaster
added
maintenance
Keeping the wheels turning
breaking change
Likely requires a SemVer version bump
labels
Sep 24, 2019
The new minimum supported Rust version will be 1.31. This removes the rust_1_30 feature, which was used to opt into better support for higher-than-minimum versions of Rust; it's no longer needed because there we have no features that require beyond Rust 1.31. Code that was conditional on rust_1_30 is now required. Compatibility tests for 1.30 were replaced with 1.31. Background: shepmaster#154
Now that Rust 1.31 is the minimum version, we can update to the Rust 2018 edition and use some of its simpler idioms. This doesn't change every single location that could be simplified with Rust 2018 syntax, but does clean up via `cargo fix --edition` and remove some of the more obnoxious extra reference operators that are now implied.
The only mandatory change is the two places we're accessing the field named "tts" on syn::Attribute, which changed to "tokens". The other changes are us following suit, changing fields and variables named "tts" to "tokens".
See "Duplicate interpolations in a repetition" in https://github.com/dtolnay/quote/releases/tag/1.0.0
See "Macro for creating an ident" in https://github.com/dtolnay/quote/releases/tag/1.0.0
tjkirch
force-pushed
the
upgrade-minimum
branch
from
September 24, 2019 14:22
d12b1fa
to
5e41b13
Compare
shepmaster
approved these changes
Sep 25, 2019
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.
Let's do this thing!
❤️
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Decision made in #154.
Fixes #164.
This takes advantage of all of the improvements in syn/quote/proc-macro2 1.0 that I could find in the code, and switches to some Rust 2018 idioms, but more could probably be done with more familiarity or research.
Certainly some of the changes in my commits are debatable, for example removing vs. replacing the
rust_1_30
feature. We don't have anything conditional on version after this, so I opted for the simpler result of removing it.Unit and compatibility tests pass.