Merge pull request #18463 from benluiwj/fix/proc-macro-server-msg-improvement

Improve error message for too new proc-macro server
This commit is contained in:
Laurențiu Nicola 2024-11-02 13:58:33 +00:00 committed by GitHub
commit f17a5bbfd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,8 +56,8 @@ impl ProcMacroProcessSrv {
match srv.version_check() { match srv.version_check() {
Ok(v) if v > CURRENT_API_VERSION => Err(io::Error::new( Ok(v) if v > CURRENT_API_VERSION => Err(io::Error::new(
io::ErrorKind::Other, io::ErrorKind::Other,
format!( format!( "The version of the proc-macro server ({v}) in your Rust toolchain is newer than the version supported by your rust-analyzer ({CURRENT_API_VERSION}).
"proc-macro server's api version ({v}) is newer than rust-analyzer's ({CURRENT_API_VERSION})" This will prevent proc-macro expansion from working. Please consider updating your rust-analyzer to ensure compatibility with your current toolchain."
), ),
)), )),
Ok(v) => { Ok(v) => {