-
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
Rename symbol - No file available to rename #14379
Comments
Probably a duplicate of #13388. |
I also noticed this today. Feels likely that there is a regression somehow? The code where I'm running into this is using |
Can someone check if it happens before #14232 ? (Or more generally bisect it) |
It is likely that PR + the one where I fixed reference search not working in attributes again. This line should try mapping out of macro calls and only error if the definition can't be mapped to macro inputs (we should also adjust the error stating that the definition comes from a macro and hence can't be renamed) |
I have also encountered this error (also using tokio) and I can't manage to get symbol renaming working again. It worked earlier today, even for a while after reloading VSCode with the newest version of rust-analyzer. No idea what prompted it to break only after a while. |
Here is an MRE: Renaming the variable does work async fn main() {
let a = 1;
} Renaming the variable doesn't work #[tokio::main]
async fn main() {
let a = 1;
} |
Also started to experience this with |
Also noted it has other effects, e.g. "Extract into function" refactoring disappears from the right-click context menu in VS Code. |
I just had the same issue with a slightly different error message while using the
rust-analyzer version: 3.1924 It's the same error message as #15656, but I can successfully rename the fn when I comment out the macro attribute |
That will need more information than that, ideally a snippet that caused this |
Trying to rename the |
When trying to rename a symbol (by pressing F2) I get:
CleanShot.2023-03-19.at.20.39.58-converted.mp4
rust-analyzer version: rust-analyzer version: 0.3.1435-standalone (f1e51af 2023-03-12)
rustc version: rustc 1.68.0 (2c8cc3432 2023-03-06) (built from a source tarball)
The text was updated successfully, but these errors were encountered: