Simplify the arguments to macros generated by the rustc_queries proc macro#100946
Merged
bors merged 6 commits intorust-lang:masterfrom Aug 27, 2022
Merged
Simplify the arguments to macros generated by the rustc_queries proc macro#100946bors merged 6 commits intorust-lang:masterfrom
rustc_queries proc macro#100946bors merged 6 commits intorust-lang:masterfrom
Conversation
It's not actually necessary and it makes the code harder to read.
Rustdoc documents these with the name of the type alias instead of normalizing them to the underlying type. Use associated types instead so that the generated docs for nightly-rustc are easier to read.
This should both make the code easier to read and also greatly reduce the amount of codegen the compiler has to do, since it only needs to monomorphize `create_query_frame` for each new key and not for each query.
- Disallow multiple macros callbacks in the same invocation. In practice, this was never used. - Remove the `[]` brackets around the macro name - Require an `ident`, not an arbitrary `tt`
It's unnecessary.
Contributor
|
@bors r+ rollup=never |
Collaborator
Member
Contributor
|
@bors r+ |
Collaborator
Collaborator
Contributor
|
This not rebased over #100436, so first 4 comments doubled. |
Collaborator
|
☀️ Test successful - checks-actions |
Collaborator
|
Finished benchmarking commit (4065b89): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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.
Footnotes |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Very small cleanup. Based on #100436 which modifies some of the same code.
r? @cjgillot