Open
Description
Some lints in rustc work via implementing the EarlyPassLint trait. This trait only needs ast level data and not types or hir level data, so it should be easy to port it, I think.
If this kind of lint implementation (each lint provides some functions, for example check_expr
, check_block
, check_ident
, ... function, that RA should call it for each changed expression, block, ...) is ok performance-wise for ide usage (I think a small change leads to small expressions become invalidated, but I'm not sure), reusing them from rustc and clippy would save some effort and bring some consistency between rustc and RA diagnostics. With future unification of RA and rustc, we can think about porting other lints as well.
Activity