-
-
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 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`
…uwer Rollup of 11 pull requests Successful merges: - #146901 (Support AVRTiny devices in AVR inline assembly) - #150988 (Improve code suggestion for incorrect macro_rules! usage) - #152422 (Change query proc macro to be more rust-analyzer friendly) - #152496 (Fix multi-cgu+debug builds using autodiff by delaying autodiff till lto) - #152520 (Don't use `DepContext` in `rustc_middle::traits::cache`) - #152528 (Support serializing CodegenContext) - #152082 (Move tests) - #152444 (`-Znext-solver` Prevent committing unfulfilled unsized coercion) - #152486 (remove redundant backchain attribute in codegen) - #152529 (sparc64: enable abi compatibility test) - #152548 (reject inline const patterns pre-expansion)
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`
Rollup of 18 pull requests Successful merges: - #150551 (Compute localized outlives constraints lazily) - #150752 (Update libc to v0.2.181) - #150988 (Improve code suggestion for incorrect macro_rules! usage) - #152422 (Change query proc macro to be more rust-analyzer friendly) - #152496 (Fix multi-cgu+debug builds using autodiff by delaying autodiff till lto) - #152514 (Collect active query jobs into struct `QueryJobMap`) - #152520 (Don't use `DepContext` in `rustc_middle::traits::cache`) - #152528 (Support serializing CodegenContext) - #152082 (Move tests) - #152232 (Add must_use for FileTimes) - #152329 (Simplify parallel! macro) - #152444 (`-Znext-solver` Prevent committing unfulfilled unsized coercion) - #152486 (remove redundant backchain attribute in codegen) - #152519 (Fix feature gating for new `try bikeshed` expressions) - #152529 (sparc64: enable abi compatibility test) - #152548 (reject inline const patterns pre-expansion) - #152550 (Port #[prelude_import] to the attribute parser) - #152552 (Add 2048-bit HvxVectorPair support to Hexagon SIMD ABI checks)
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`
Rollup of 17 pull requests Successful merges: - #150551 (Compute localized outlives constraints lazily) - #150988 (Improve code suggestion for incorrect macro_rules! usage) - #152422 (Change query proc macro to be more rust-analyzer friendly) - #152496 (Fix multi-cgu+debug builds using autodiff by delaying autodiff till lto) - #152514 (Collect active query jobs into struct `QueryJobMap`) - #152520 (Don't use `DepContext` in `rustc_middle::traits::cache`) - #152528 (Support serializing CodegenContext) - #152082 (Move tests) - #152232 (Add must_use for FileTimes) - #152329 (Simplify parallel! macro) - #152444 (`-Znext-solver` Prevent committing unfulfilled unsized coercion) - #152486 (remove redundant backchain attribute in codegen) - #152519 (Fix feature gating for new `try bikeshed` expressions) - #152529 (sparc64: enable abi compatibility test) - #152548 (reject inline const patterns pre-expansion) - #152550 (Port #[prelude_import] to the attribute parser) - #152552 (Add 2048-bit HvxVectorPair support to Hexagon SIMD ABI checks) Failed merges: - #152515 (Extract `DepKindVTable` constructors to their own module)
This changes the query proc macro to be more rust-analyzer friendly.
rustc_middle:::query::modifiers