-
Notifications
You must be signed in to change notification settings - Fork 1.8k
RA is broken for #[actix_rt::main] with proc macros enabled #4315
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
Aiya, after some investigation, I ended up confirming the root cause of this bug: There is a panic in
It is caused by some proc-macro generated are inconsistent. I added some
Noted that the orders of tokens are different, and it is due to the fact that And we had some discussion for the general solution of this problem and I will start to study and implement a solution soon. |
Even if there is a solution to this problem, |
Yeah, I will submit an issue to them. |
Seems that there's exactly 3 usages of hopefully, the PR to fix it will be small. |
Upstream issue submitted, and if someone could write a blog post to call out people please don't use |
What is the error you are getting, what rustc version and what rust-analzer version are you using? |
never mind I've fixed it |
Cargo.toml:
main.rs:
Enable proc macro and
loadOutDirsFromCheck
settings.Expected: inlay hints present, highlighting works, completions proposed
Actual: very few RA features such as code lens are present, the rest is not working across the whole project
Here's how it looks with disabled proc macros:

Notice the hint and the highlighting.

When I toggle the proc macro checkbox and reload the server, I get this:
This happens in the code of a whole project, not only in the

main.rs
, making RA pretty useless.Another interesting thing to notice that RA works fine with tokio:
The text was updated successfully, but these errors were encountered: