-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
macros: fix diagnostics of last statement #5762
Conversation
This commit prevents rust-analyzer from incorrectly analyzing the last statement of the main function as a `Builder::new_*` method.
This PR is simpler than the abandoned #5619. What is the difference? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, if this works for you in your IDE, then that's good enough for me.
Thanks! |
I apologize, it looks like the problem hasn't been fixed. Something very strange happened to me. When I rebuilt after deleting the target directory and Cargo.lock, it seemed to be fixed, but when I set the dependency to a Git repository after the PR was merged, it didn't fix the problem. Setting the dependency to a local repository makes the problem go away, regardless of the patch. I assumed this was caused by a bad local cache, so I cleared the extension and even reinstalled the entire rust compiler, but that didn't fix it. Edit: |
Okay, I reopened the issue. That said, I'm not sure we have to revert the change. It doesn't seem problematic. |
I didn't see your comment before creating the revert PR. |
This change prevents rust-analyzer from incorrectly analyzing the last statement of the main function as aBuilder::new_*
method.Fixes #5518It was a combination of coincidences that led me to think the issue was resolved.