diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-09-09 09:12:09 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-09-09 09:12:09 +0200 |
| commit | a1a1ed25f2749de58c24a618460cb3d4279b1d5c (patch) | |
| tree | 1f71e6bd9a3c558121f49063887e69f1aae6ca7d | |
| parent | e8206d0b88cf48d692c059a913d7124375448934 (diff) | |
| download | rust-a1a1ed25f2749de58c24a618460cb3d4279b1d5c.tar.gz rust-a1a1ed25f2749de58c24a618460cb3d4279b1d5c.zip | |
Add a FAQ entry about RA and Cargo interaction
| -rw-r--r-- | src/tools/rust-analyzer/docs/book/src/faq.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/docs/book/src/faq.md b/src/tools/rust-analyzer/docs/book/src/faq.md index c8720330901..8c143ab9493 100644 --- a/src/tools/rust-analyzer/docs/book/src/faq.md +++ b/src/tools/rust-analyzer/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. |
