-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Change query proc macro to be more rust-analyzer friendly #152422
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
base: main
Are you sure you want to change the base?
Conversation
|
r? @fmease rustbot has assigned @fmease. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
I might take a look at this PR but I'm not sure if I'm the right person since I've disabled proc-macro expansion for r-l/r checkouts to avoid rust analyzer frying my machine, so I can't really experiment with this patch locally. |
This comment has been minimized.
This comment has been minimized.
|
r? @Zalathar |
cc3d630 to
1aaa7b0
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
I was initially worried about this breaking hover-docs and find-all-references (for the query method) from (They do appear to still work for calls to the query method.) |
|
I'm not seeing any tooltips for the query modifiers on my machine; hovering over the modifier name in the Is it working for you? |
compiler/rustc_macros/src/query.rs
Outdated
| } | ||
| } | ||
|
|
||
| /// The description of the query. |
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 these structs, I think it would be more helpful to leave the field comments on the QueryModifiers fields, and instead document the structs with something like:
/// Details of a parsed `desc` modifier.
That way the struct docs describe the struct itself, and express a clear connection to the corresponding modifier.
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.
I would also suggest squashing the structs into the main commit.
(Or you could rearrange them into an earlier commit if you really want separate commits, but that's extra work.)
1aaa7b0 to
47b4e02
Compare
Yeah, on |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This changes the query proc macro to be more rust-analyzer friendly.
rustc_middle:::query::modifiers