-
Notifications
You must be signed in to change notification settings - Fork 1.8k
RA inlay hint
cannot work properly in functions with proc_macro
annotations
#14527
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
Comments
parameterHints
cannot work properly in functions with proc_macro
annotationsparameter inlay hint
cannot work properly in functions with proc_macro
annotations
parameter inlay hint
cannot work properly in functions with proc_macro
annotationsinlay hint
cannot work properly in functions with proc_macro
annotations
I spent a bit of time looking into this one (more specifically, why the parameter hints weren't showing) and it may be a bit over my head, so I am just going to context dump here... Generating the hints for parameter types seems to be done in crates/ide/src/inlay_hints/param_name.rs. Like several of its sibling modules, it has a The body of this function calls Tracing this back further, you get to the Why this is the case, I have no idea and I must stop for the night. Maybe someone with more knowledge can figure it out based on this information :) |
The root cause of this bug turned out to be #14959. It has since been fixed by #14960, but you need to update the proc-macro server (as opposed to rust-analyzer) that's usually installed via rustup along with rustc. The fix only made it to the current beta (1.72), so to actually see this fixed in your editor, you need to either wait for the next stable release or use the beta or nightly toolchain. Closing as fixed but please be noted above. Thanks for the report! |
I still see this behavior on latest versions: If function is guarded (for example) with This is not problem of tracing crate, the same behavior I see using macro from AsyncGraphQL and others. |
As @mlesin reported, same problem is showing on latest versions (pre-release RA, vscode nightly) with |
Uh oh!
There was an error while loading. Please reload this page.
rust-analyzer version: rust-analyzer version: 0.3.1463-standalone
rustc version: rustc 1.68.2 (9eb3afe9e 2023-03-27
RA
parameterHints/chainingHints
cannot work properly in functions withproc_macro
annotations, buttypeHints
seem to work normallyExample
Proc macro
Test
The text was updated successfully, but these errors were encountered: