I get red squiggles on the code, and when I hover, or look at the 'problems' tab or the 'output' tab of the terminal, I get the error shown below. It s saying that my rust analyzer does not support the current (more recent) proc-macro server. But it compiles and runs without errors anyway!
I have tried using both release and pre-release versions of rust analyzer, without success
Thanks for any help you can offer!
2026-05-08T17:39:38.062004844-07:00 ERROR Failed to run proc-macro server from path /home/adam/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/libexec/rust-analyzer-proc-macro-srv, error: Custom { kind: Other, error: "The version of the proc-macro server (6) in your Rust toolchain is newer than the version supported by your rust-analyzer (5).\n This will prevent proc-macro expansion from working. Please consider updating your rust-analyzer to ensure compatibility with your current toolchain." }
0.3 is an old version. did you install it from the marketplace or from an offline .vsix package?
try uninstall the rust-analyzer vscode extension and re-install the latest version.
EDIT:
I thought v0.4 was the latest release because that's what I got, but I realize I'm on pre-release channel. it seems v0.3 is the latest release.
did you configured the vscode extension to use a different lsp server? e.g. check the rust-analyzer.server.path setting, if this is set, try reset it back to default so the bundled server is used.
This is to be expected. The rust-analyzer-proc-macro-server is used only to help with editing code that contains proc-macros. Only rust-analyzer uses it; cargo build doesn’t.
I got rust-analyzer by going to the Extensions tab in vscode. I have tried both pre-release and release versions and also tried restarting and even reinstalling it.
Basically everything is a brand new default installation. I havent configured vscode except for adding rust-analyzser.
check the rust-analyzer.server.path
I dont know how to do this. Nothing about server path in my vscode command list
it's strange, for some reason the rust analyzer is stuck with an older version. I just checked, v0.3.2319 is about one year old. the latest release version I can see is v0.3.2887, which was released just days ago.
maybe try to manually update the extension?
if you didn't configure it, it's very unlikely the real cause. but you can always double check, just in case.
you can find the setting in the "Settings" page, e.g. press Ctrl + , (comma) and then search rust-analyzer.server.path in the filter.
I have also encountered a situation exactly like yours before, also on Ubuntu system, but I was using code-server (the web service version of VSCode). This issue suddenly appeared after updating the rustc version. I eventually resolved it by reinstalling the latest version of code-server.