Skip to content

unresolved extern crate for rustc private crates for 2025-03-17 nightly #19503

@zjp-CN

Description

@zjp-CN

rust-analyzer version: rust-analyzer 1.87.0-nightly (43a2e9d 2025-03-17)

rustc version: rustc 1.87.0-nightly (43a2e9d 2025-03-17)

editor or extension: neovim

relevant settings:

  • [package.metadata.rust-analyzer] rustc_private=true in Cargo.toml
  • "rust-analyzer.rustc.source": "discover" in settings.json

code snippet to reproduce:

#![feature(rustc_private)]
extern crate stable_mir; // 👈 unresolved extern crate
fn main() {}
[toolchain]
channel = "nightly-2025-03-18" // change this to nightly-2025-04-01, the "unresolved extern crate" problem gone
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt", "rust-analyzer"]

NOTE: I think this is likely a temporary regression in RA, because I've tested RA before or after 2025-03-17 version and found RA works well.

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions