As commented, the supported approach is to use rustup:
- Navigate to https://rustup.rs/ and follow the installation instructions for your platform.
- Add the
rust-srccomponent by running:rustup component add rust-src - Create a new Rust project in IntelliJ and choose your existing Rust project source. If the folder already contains previous IntelliJ project files, you may have to delete those first before it will let you proceed.
- IntelliJ-Rust should automatically configure the standard library sources to point to the sources downloaded by
rustup.