rust-analyzer doesn't show some errors from cargo check
rust-analyzer version: 0.4.1196
rustc version: rustc 1.60.0 (7737e0b5c 2022-04-04)
relevant settings: (eg. client settings, or environment variables like CARGO, RUSTUP_HOME or CARGO_HOME).
- RUSTUP_HOME: /usr/local/rustup.
- CARGO_HOME: /usr/local/cargo
Basically, my code has errors that rust-analyzer doesn't pick up. This doesn't happen for all errors. It all started one or two versions back.
- Errors from rust check:
. - No error on my IDE on the same line:
Sadly, this is a private project so I can't really share the repo. I'm unsure how to proceed to get help. I tried to make a repro but it's hard because only some errors are not shown.
If that counts, I use cargo workspace, and from searching, seems rust-analyzer has trouble with that sometimes.
Again sorry that I can't provide a reproduction, but maybe off the bat there's something I can do?
Does cargo cleaning the project fix it? Sometimes cargo gets confused by r-a that messes with cargo checks that r-a executes.
Nope, it did not fix it. Restarting RA didn't help either.
Also, unsure if it's related, but it seems like it's a lifetime error that completely disable any other errors from being reported. It happened in the past too. As soon as I solve the lifetime error, RA correctly report errors in other parts of the code.
If this is important, this is what the lifetime error looks like:

Are we sending empty diagnostics again?
Are we sending empty diagnostics again?
How can I debug things how my side?
Can you check the Log (Extension Host) logs for any exceptions being thrown? Also please check the Rust Analyzer Server Log logs for anything that might be releveant. You can access these via the Output tab in VSCode
Output for Rust Analyzer Server and Rust Analyzer Server Trace are empty. As for the extension host, there is no error:

@CyriacBr I suppose you should put the RA server logging to verbose in the settings

are you still experiencing this?
I have got the same issue now. Inline type hints are shown, but errors / warnings are not. But there are definitely cargo check problems reported