Rust-analyzer in VScode encounters problem when starting server

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.

Could anyone tell me why and how to fix it? Thanks

I have searched github page and found what is rustc_cfg.

But as a beginner I dont know how it works in my extension. I use Everything to search on my local but get no result. What should I check next?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.