rust-analyzer: Proc macros not working on new install of rustup and rust-analyzer stable and pre-release
[ERROR rust_analyzer::reload] Failed to run proc-macro server from path /home/chase/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/libexec/rust-analyzer-proc-macro-srv, error: Custom { kind: Other, error: "proc-macro server's api version (3) is newer than rust-analyzer's (2)" }
rust version:
$ rustup --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.76.0 (07dca489a 2024-02-04)`
I get the same error on the pre-release version as well.
Can’t find any info anywhere about this error.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (2 by maintainers)
@jonaspleyer, how do you use
rust_analyzerfrom Neovim? Do you manage your extensions withmason-lspconfig? If so, don’t forget thatmasonwould download a local version stored in~/.local/share/nvim/mason/bin/(or similar). You can run:LspInfoin Neovim to check where yourrust_analyzeris located. If so, run:LspInstall rust_analyzeror simply re-install/update yourrust_analyzer. Hope this helps!Running
rustup updatesolved the issue for meThanks @Veykril and @daniel-abramov it was totally my fault. I have installed rust-analyzer via mason and updating that fixed it as well. Thanks so much!
I am having exactly the same bug but updating my IDE did not work unfortunately. I am using neovim with packer with the latest version of
rust-analyzerfrom the Arch extra repo.I am also having this problem, fully updated. macOS Sonoma 14.1.1 Vscode 1.100.2 rustc 1.87.0 rust-analyzer 0.3.1975
for me doesn’t work
I am running into a similar issue when installing verus with rust-analyzer in VS Code. I do have a latest version of VS code
Double check what rust-analyzer version your editor specifically is running, some people have multiple versions installed somehow where the editor using the one they didn’t check
This issue is fixed by updating the ide and the extension to the latest version