I'd like to start out with that I'm pretty new to Rust, and I tried to solved this issue myself and unfortunately after hours of searching and trying countless things I can't remember, I have decided to finally ask for help.
Right now one of my projects is using the rust-analyzer
extension in VS Code. However, upon every save the rust-analyzer
scans everything inside the .cargo/registry/src/
directory. Obviously this is not ideal and brings up 2k or more errors in VSCode's "Problems" tab near the terminal. Here is a screenshot below:
This results in extremely slow development, as I have to wait for rust-analyzer
every single time I save, and with it scanning this much and showing over 2k errors, it's quite time consuming. Also, I am using https://gitpod.io/, so I cannot do anything such as code file.rs
and such.
I apologize if I'm missing anything here or this isn't an ideal topic, as this is my first time actually posting something here.
Edit: Solved, however I'd like to note that the .cargo directory is completely outside of the project directory, which was the most confusing part. My project is located in /workspace/<project_name>
and cargo is in /workspace/.cargo
.