It seems that VSCode can't identify the Rust compiler's library automatically.
Or what are the correct operations?
You have to set the rust-analyzer.rustc.source
config to "discover" and add the following to the Cargo.toml of the crate that uses the rustc internal libraries:
[package.metadata.rust-analyzer]
rustc_private=true
2 Likes