rust-analyzer version via rust-toolchain.toml

If you use an older toolchain, this will make for a better developer (and contributor!) experience.

Assumed audience: Rust developers who know how to use rustup and rust-toolchain files.

A follow-on to my note a couple days ago about configuring Zed to use a specific version of rust-analyzer: I learned today from this thread on GitHub that rust-analyzer will use the rust-toolchain.toml as a source of overrides if the rust-analyzer component is present in the toolchain file. For example, a toolchain file like this would make use the versions of both rust-analyzer and clippy which shipped with Rust 1.83.0:

[toolchain]
channel = "1.83.0"
components = ["rust-analyzer", "clippy"]

At the moment, I do not believe this is expressly or clearly documented anywhere, but I believe the folks who maintain rust-analyzer will be working on fixing that!

This should make this work nicely for any tool which uses rust-analyzer, whereas my previous tip would only apply to Zed, and likewise any similar configuration you might apply for VS Code or Neovim or whatever other tool would only apply to those. If you maintain a project which pins to a specific version, you probably should not include the rust-analyzer component this way by default, for the sake of good developer experience for folks contributing: let them get the best version of rust-analyzer that works with your code. By the same token, though, you probably should pin the component as soon as you become aware that rust-analyzer has stopped explicitly supporting whatever version you have pinned!