Cargo-powered diagnostics fail silently when a dependency fails to build #7517
Labels
A-diagnostics
diagnostics / error reporting
S-actionable
Someone could pick this issue up and work on it right now
Repro
asdf();
function tomain
)Expected outcome
Rust-Analyzer reports an error building dependencies.
Actual outcome
Rust-Analyzer reports no errors, and displays the
asdf();
call as a valid call of type{unknown}
.Well, duh, of course this doesn't work
This example is pretty contrived, but it's easy to get bit by in multi-crate workspaces. If you have multiple
bin
crates then they can end up with conflicting dependencies, which work fine when building any crate in isolation (such as runningcargo run
, orcargo build
inside of the crate directory), but break when building the whole workspace (such as runningcargo build
in the workspace dir, or running Rust-Analyzer).The text was updated successfully, but these errors were encountered: