From 3e5e4f30cdca1686c849f2babb88df4cdba8cce5 Mon Sep 17 00:00:00 2001 From: Daira-Emma Hopwood Date: Sun, 28 Jul 2024 23:25:55 +0100 Subject: [PATCH] Tell rust-analyzer to compile using stable, because the Rust version from `rust-toolchain.toml` is too old for the current proc-macros protocol (specifically, the `--keep-going` flag was not stable in Rust 1.70, as can be verified by `cargo +1.70.0 check --keep-going`). This works around https://github.com/rust-lang/rust-analyzer/issues/17662 , and very likely future problems, because the rust-analyzer devs are quite aggressive in depending on recent versions: "by policy we don't make any attempts at supporting more than the last couple of stable releases" according to https://github.com/rust-lang/rust-analyzer/issues/17662#issuecomment-2242265513 . The toolchain we select in `rust-toolchain.toml` often lags behind that intentionally, because we want to verify that we build with our MSRV. Signed-off-by: Daira-Emma Hopwood --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 39a5ca1e3..b31e2934f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "rust-analyzer.cargo.features": "all" + "rust-analyzer.cargo.features": "all", + "rust-analyzer.server.extraEnv": { "RUSTUP_TOOLCHAIN": "stable" } }