-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
"Convert identifier to uppercase" code assist doesn't replace references to the variable #15319
Comments
Are you sure about this? Our diagnostic doesn't trigger for inner items, but otherwise the fix works just fine: Then there's also the warning from |
The diagnostic mentioned in OP does come from rustc, which doesn't account for name references, but we should be also reporting the diagnostics for them anyway. #15320 should fix that. |
And as always, I’m impressed by the bug fixing speed of y’all. Thanks a lot! |
@lowr @lnicola Hello again! Quick question: With the latest version of RA I'm now seeing the 2 code actions below: The first one does correctly update references, while the 2nd one (which is the one I originally mentioned in this issue) still only updates the declaration. I'm not asking for further changes, I just want to better understand the difference between them. |
In particular, from the description of #15320 it sounds like RA just started providing those refactorings, and so who's providing the 2nd one? Because from the UI above it looks like RA is the only code action provider... |
It's from rustc (cargo check), see my comment above. |
Oh I'm so sorry, I missed that very important last sentence. My bad! |
rust-analyzer version: 0.3.1591-standalone (d824511 2023-07-16)
rustc version: rustc 1.72.0-nightly (37998ab50 2023-06-11)
Given the following code:
rust-analyzer
will display the "Convert the identifier to upper case" code assist. However, when applying the refactoring only the declaration is updated, not the references.And so the outcome is:
The text was updated successfully, but these errors were encountered: