-
Notifications
You must be signed in to change notification settings - Fork 1.7k
internal: Prepare parser interface for editions #16450
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
Conversation
@rustbot author |
I've noticed that (including this PR) there are three |
The one in |
Actually, the span crate depends on the parser through the syntax crate, so we can remove the base-db edition and have the span crate re-export the parser one. |
☔ The latest upstream changes (presumably #16492) made this pull request unmergeable. Please resolve the merge conflicts. |
f0bca43
to
e785280
Compare
f8f06d6
to
83370fe
Compare
Rebased and deduplicated the enum. The edition field doesn't do anything yet, but I'll merge this as is as a preparation step. Future work can be built on top as a separate PR |
Thanks! |
☀️ Test successful - checks-actions |
@@ -1157,7 +1157,7 @@ fn iterate_trait_method_candidates( | |||
{ | |||
// FIXME: this should really be using the edition of the method name's span, in case it | |||
// comes from a macro | |||
if db.crate_graph()[krate].edition < Edition::Edition2021 { | |||
if db.crate_graph()[krate].edition < Edition::CURRENT { |
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.
Shouldn't this stay as Edition2021
?
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.
Good catch, I misread the comment
minor: Fix `rustc_skip_array_during_method_dispatch` edition check CC #16450
internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros Follow up to rust-lang/rust-analyzer#16450, cc rust-lang/rust-analyzer#16324
🙏🏾 |
No description provided.