rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Outdated toolchain version error is hard to understand

Open moritzmucha opened this issue 11 months ago • 1 comments

rust-analyzer version: 0.3.2711

rustc version: rustc 1.85.0 (4d91de4e4 2025-02-17)

editor or extension: VSCode

relevant settings: none

The message rust-analyzer produces when encountering an outdated toolchain version:

path/to/Cargo.toml is using an outdated toolchain version 1.85.0 but rust-analyzer only supports 1.90.0 and higher. Consider using the rust-analyzer rustup component for your toolchain or upgrade your toolchain to a supported version.

... can be very confusing, especially if it suddenly starts appearing after VSCode has silently updated to a new rust-analyzer version that drops support for older toolchain versions (like 0.3.2711)

  1. It makes the user think their Cargo.toml is the issue
  2. It's a bit unclear in how to resolve the issue (for someone unfamiliar with rustup)

Better wording might be:

This project (path/to/Cargo.toml) uses the Rust toolchain version 1.85.0, but rust-analyzer requires 1.90.0 or higher. You can update your toolchain by running rustup update, or manually change overrides (if present).

moritzmucha avatar Dec 09 '25 12:12 moritzmucha

AFAIK the comment about rustup wasn't to update rust-analyzer (this certainly doesn't apply to the VSCode extension), but rather to point the extension to use the rustup server, since it is guaranteed to always work with the toolchain.

ChayimFriedman2 avatar Dec 09 '25 12:12 ChayimFriedman2