Rust moved its standard library into a workspace about 13 months ago. I've experienced a weird condition in offline installations of rust-analyzer and VSCode where I lose the prelude. E.g., I have to import Some from core in order for RA to deduce the type of Some(1_i32). This problem goes away if I remove the Cargo.toml from the workspace root of the standard library (rust/library/Cargo.toml). I have seen this as recently as with Rust 1.89.0 and 0.4.2609 using the RA installed by rustup.
This seems like a "me" problem and not a bug. What can I do to debug this and get more introspection into how rust-analyzer is failing?
Set the environment variable RA_LOG=project_model=debug. You can do that by setting rust-analyzer.server.extraEnv on VSCode, other editors may have other ways. Then post rust-analyzer's logs here (in VSCode they're in Output -> rust-analyzer Language Server).