Skip to content

rust-analyzer unable to find rust-src after update to 0.3.2509 #20250

@ogapo

Description

@ogapo

rust-analyzer version: 0.3.2509 (NOTE: does not occur in 0.3.2500)

rustc version: rustc 1.88.0 (6b00bc388 2025-06-23)

editor or extension: VSCode rust-lang.rust-analyzer 0.3.2509 MacOS (aarm64)

relevant settings:
Not sure which of these is relevant but some quirks:

  • project uses vendored dependencies (e.g. cargo vendor ./.cargo/vendor)
  • project uses multi-root workspaces in VSCode
  • project uses cargo workspaces

code snippet to reproduce:

Unfortunately I've yet to be able to repro this with a small project and I can't share the full repo. I've narrowed it down to specifically version 0.3.2509 in rust analyzer. Within that release, I'm a bit suspicious of #20047

The observed behavior is I get Problems such as "Variable None should have snake_case name, e.g. none [non_snake_case]" emitted and I cannot go to definition on any symbols in the rust standard library. This seems like it can't find rust-src. Cargo compiles fine though and rust-analyzer is able to go to definition properly on any symbols defined in my project or in any of the crates I'm importing. Wondering if perhaps the cargo check --compile-time-deps option is interacting poorly with the vendoring?

** workaround **

For now I can pin myself to 0.3.2500 but obviously it would be great to be able to take updates :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargocargo related issuesC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions