Change query proc macro to be more rust-analyzer friendly#152422
Change query proc macro to be more rust-analyzer friendly#152422Zoxc wants to merge 1 commit intorust-lang:mainfrom
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 comment has been minimized.
This comment has been minimized.
|
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? |
1aaa7b0 to
47b4e02
Compare
Yeah, on |
This comment has been minimized.
This comment has been minimized.
I updated r-a and hovering on modifiers works for me now, so it must have been sensitive to a recent change. 👍 |
|
Looks good, thanks. @bors r+ |
Change query proc macro to be more rust-analyzer friendly This changes the query proc macro to be more rust-analyzer friendly. - Types in the macro now have a proper span - Some functions have their span hidden so they don't show up when hovering over the query name - Added a hint on the provider field on how to find providers. That is shown when hovering over the query name - Linked query name to the provider field on all queries, not just ones with caching - Added tooltip for the query modifiers by linking to the new types in `rustc_middle:::query::modifiers`
This comment has been minimized.
This comment has been minimized.
47b4e02 to
8cc4b93
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. |
|
@bors r+ |
Change query proc macro to be more rust-analyzer friendly This changes the query proc macro to be more rust-analyzer friendly. - Types in the macro now have a proper span - Some functions have their span hidden so they don't show up when hovering over the query name - Added a hint on the provider field on how to find providers. That is shown when hovering over the query name - Linked query name to the provider field on all queries, not just ones with caching - Added tooltip for the query modifiers by linking to the new types in `rustc_middle:::query::modifiers`
Change query proc macro to be more rust-analyzer friendly This changes the query proc macro to be more rust-analyzer friendly. - Types in the macro now have a proper span - Some functions have their span hidden so they don't show up when hovering over the query name - Added a hint on the provider field on how to find providers. That is shown when hovering over the query name - Linked query name to the provider field on all queries, not just ones with caching - Added tooltip for the query modifiers by linking to the new types in `rustc_middle:::query::modifiers`
This changes the query proc macro to be more rust-analyzer friendly.
rustc_middle:::query::modifiers