-
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
rustc_macros
cleanups
#117731
rustc_macros
cleanups
#117731
Conversation
|
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.
one comment, r=me after that
} | ||
|
||
impl Parse for Input { | ||
// Input syntax is `env!("CFG_RELEASE")` to facilitate grepping. |
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.
All this was added just a couple of weeks ago in #117256 :D
It currently has the syntax `current_rustc_version!(env!("CFG_RELEASE"))` where the `env!("CFG_RELEASE")` part looks like a normal expression but it is actually parsed and processed by the `current_rustc_version` macro. The documented rationale for this is that you'll find it if you grep for `env!("CFG_RELEASE")`. But I think that's of very little use -- I would personally grep for just "CFG_RELEASE" -- and it complicates the macro, requiring the use of `syn`. This commit simplifies the macro.
- Reduce some function exposure. - Fix some comment formatting.
And avoid duplication.
c824013
to
dd6bab9
Compare
@Nilstrieb: I addressed the error message comment. |
@bors r+ rollup |
☀️ Test successful - checks-actions |
Finished benchmarking commit (fa14810): 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 673.782s -> 674.599s (0.12%) |
Just some improvements I found while reading over this code.
r? @Nilstrieb