-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
migrate rustc_macros to syn 2.0 #109663
migrate rustc_macros to syn 2.0 #109663
Conversation
r? @Nilstrieb (rustbot has picked a reviewer for you, use r? to override) |
6aa5f6d
to
439724f
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #109668) made this pull request unmergeable. Please resolve the merge conflicts. |
439724f
to
ffc9475
Compare
cc @davidtwco, @compiler-errors, @JohnTitor, @TaKO8Ki These commits modify the If this was intentional then you can ignore this comment. |
ffc9475
to
fe186e4
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@rustbot ready |
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.
Thanks a lot! A few small improvements.
I see a lot of bespoke meta handling which makes the code a lot more complex. Maybe it would be a good idea to investigate using something like darling in the future?
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.
The error messages got a little worse but that seems fine to me.
let _ = attr.parse_nested_meta(|nested| { | ||
if nested.path.is_ident("ignore") { | ||
ignored = true; | ||
} |
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.
(for a potential future PR, not for now) the else here could maybe be an error
It might be good, but currently we don't have darling in our Cargo.lock, and I don't know the procedure for adding a library like that. |
0732498
to
d764c2d
Compare
I think the usual procedure is just adding it and then double checking with someone from the compiler team that it really makes sense or something like that. Might je worth quickly asking on zulip before doing the implementation work. |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (32ea4bb): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
WIP at this point since I need to work on migrating the code that heavily uses
NestedMeta
for parsing. Perhaps a full refactor would be nice..