Open komar007 opened 4 months ago
Please update your rust-analyzer to the latest version, the diagnostic is silenced in that case (we still fail to normalize the output here)
@Veykril thanks a lot, it's solved indeed.
Why check the latest version if you can spend an hour trying to find a minimal reproduction... It was fun anyway:)
This happens only with experimental diagnostics enabled, but I thought I'd post it in case it helps in any way. Here is a rather minimal reproduction of a false error in the assertion at the very bottom of the code. The code compiles without errors, clippy doesn't complain.
rust-analyzer version: rust-analyzer 1.76.0 (07dca48 2024-02-04)
rustc version: rustc 1.76.0 (07dca489a 2024-02-04)
editor or extension: neovim
relevant settings: rust-analyzer.diagnostics.experimental.enable
code snippet to reproduce:
It looks like it doesn't recognize the
assert!
macro as matchingx
, which isbool
in this case. Also if you check the type ofx
, it says<impl Tr as Tr>::Output
, which is technically correct, but not very useful in this case.