-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
No completion inside of macro args #15016
Comments
This is kind of expected, our recovery for macro inputs is not that great yet. We don't pick an ideal matching arm for incorrect inputs yet, and we also do not consider the fragment type of captures to aid in recovery either. To answer the question whether this can be easily fixed right now, I'd say not necessarily. Picking a better matching arm for incorrect/partial inputs for macros can be worked on though it's a tough problem. Considering fragment types we are missing the infra for currently. |
For format strings, the format string parameter itself (e.g. first argument of
|
#16060 fixes the format_args family of macros, |
rust-analyzer version: rust-analyzer version: 0.4.1545-standalone
rustc version: rustc 1.72.0-nightly (101fa903b 2023-06-05)
I have the following code:
and where the comment is I write something along these lines with each and every macro:
assert!(x.
ctrl+spaceand observe whether RA gives a suggestion on the x parameter
It's funny that some macros work, while others dont... also somewhat inconsistent i.e. in
dbg!
where the first parameter has suggestion, but the second (and third...) hasn't.Is this something that can be easily done? Some macros have suggestion, so there must be a codepath for that somewhere.
The text was updated successfully, but these errors were encountered: