Skip to content

Rust-analyzer in VScode encounters problem when starting server #15927

Closed
@Do7and

Description

@Do7and

I want to use rust-analyzer in vscode so I install the extension by vscode, but when I start to use it, it throws error :[ERROR project_model::rustc_cfg] failed to get rustc cfgs e=系统找不到指定的文件。 (os error 2). And maybe due to this error, I cannot find the "RUN doc-test" button where I write the doc test which can be detected by "cargo doc --open" command.

I take other's example as referrence, but in my rust-analyzer it doesn't work.
image

rust-analyzer version:v0.3.1730
rustc version: 1.74.0

relevant settings: NO rust-analyzer*-like setting in setting.json

Metadata

Metadata

Assignees

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