From e5a51cc6c568309216a99c8fd7b2a6a2c05e0241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Tue, 9 Sep 2025 09:12:09 +0200 Subject: [PATCH] Add a FAQ entry about RA and Cargo interaction --- docs/book/src/faq.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/book/src/faq.md b/docs/book/src/faq.md index c872033090..8c143ab949 100644 --- a/docs/book/src/faq.md +++ b/docs/book/src/faq.md @@ -5,3 +5,12 @@ rust-analyzer fails to resolve `None`, and thinks you are binding to a variable named `None`. That's usually a sign of a corrupted sysroot. Try removing and re-installing it: `rustup component remove rust-src` then `rustup component install rust-src`. + +### Rust Analyzer and Cargo compete over the build lock + +Rust Analyzer invokes Cargo in the background, and it can thus block manually executed +`cargo` commands from making progress (or vice-versa). In some cases, this can also cause +unnecessary recompilations caused by cache thrashing. To avoid this, you can configure +Rust Analyzer to use a [different target directory](./configuration.md#cargo.targetDir). +This will allow both the IDE and Cargo to make progress independently, at the cost of +increased disk space usage caused by the duplicated artifact directories.