mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 04:48:13 +00:00
internal: Treat cfg fetching failures as a warning
If the user doesn't have rustc on $PATH, rust-analyzer won't be able to run `rustc --print cfg`. This isn't really an error, as rust-analyzer can still proceed without it. This is particularly noticeable when loading crates defined in a rust-project.json. Until the configuration is loaded, the opened files are briefly treated as detached files and users see this error. Environments with rust-project.json generally have a sysroot and rustc elsewhere, so the error confuses users.
This commit is contained in:
parent
0b68402d78
commit
8f6a1e5ee5
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ pub fn get(
|
|||
let rustc_cfgs = match rustc_cfgs {
|
||||
Ok(cfgs) => cfgs,
|
||||
Err(e) => {
|
||||
tracing::error!(?e, "failed to get rustc cfgs");
|
||||
tracing::warn!(?e, "failed to get rustc cfgs");
|
||||
return vec![];
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue