-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust-analyzer in VScode encounters problem when starting server #15927
Comments
系统找不到指定的文件 = The system can not find the file specified How did you install rust? It seems rust-analyzer is unable to run |
I have surely installed rust. And in my env path there exists cargo bin directory which contains rustc.exe and so on I do not know how this rustc_cfg work in this extension, because when I use Everything to search rust_cfg on my local there shows no result. |
I just installed Rust as well as rust-analyzer and have the same issue. I can run rustc --print cfg in the terminal but rust-analyzer seems to live in its own environment where it can't find rustc. |
@AndersHogqvist if you're on Linux or MacOS, see this part of the manual: and #1811. |
I'm on Windows. In PowerShell:
Tried specifying the path in settings.json with / instead of \\ but that didn't help either:
|
Oh, |
I wanted to suggest that, but I'm looking at
|
It can't, that's a bug |
Same issue occurring here... Caused by: PS> rustc --version PS> rustup component add rust-src PS>dir (rustc --print sysroot) Mode LastWriteTime Length Name d----- 2/10/2024 2:57 PM bin |
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.
rust-analyzer version:v0.3.1730
rustc version: 1.74.0
relevant settings: NO rust-analyzer*-like setting in setting.json
The text was updated successfully, but these errors were encountered: