11524: doc: state that only the latest stable toolchain is supported r=lnicola a=jtroo

This closes #11226. The content seemed to make more sense in the
installation section as opposed to the Troubleshooting section.

Co-authored-by: Jan Tache <j.andreitabs@gmail.com>
This commit is contained in:
bors[bot] 2022-02-22 08:38:57 +00:00 committed by GitHub
commit 81af96d77a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,20 @@ To add the sources manually, run the following command:
$ rustup component add rust-src
```
=== Toolchain
Only the latest stable standard library source is officially supported for use with rust-analyzer.
If you are using an older toolchain or have an override set, rust-analyzer may fail to understand the Rust source.
You will either need to update your toolchain or use an older version of rust-analyzer that is compatible with your toolchain.
If you are using an override in your project, you can still force rust-analyzer to use the stable toolchain via the environment variable `RUSTUP_TOOLCHAIN`.
For example, with VS Code or coc-rust-analyzer:
[source,json]
----
{ "rust-analyzer.server.extraEnv": { "RUSTUP_TOOLCHAIN": "stable" } }
----
=== VS Code
This is the best supported editor at the moment.