rust-analyzer/crates/ide-diagnostics/src
Chayim Refael Friedman cc11e1a796 Unify handling of path diagnostics in hir-ty
Because it was a mess.

Previously, pretty much you had to handle all path diagnostics manually: remember to check for them and handle them. Now, we wrap the resolver in `TyLoweringContext` and ensure proper error reporting.

This means that you don't have to worry about them: most of the things are handled automatically, and things that cannot will create a compile-time error (forcing you top `drop(ty_lowering_context);`) if forgotten, instead of silently dropping the diagnostics.

The real place for error reporting is in the hir-def resolver, because there are other things resolving, both in hir-ty and in hir-def, and they all need to ensure proper diagnostics. But this is a good start, and future compatible.

This commit also ensures proper path diagnostics for value/pattern paths, which is why it's marked "feat".
2024-12-24 18:58:52 +02:00
..
handlers Unify handling of path diagnostics in hir-ty 2024-12-24 18:58:52 +02:00
lib.rs Properly handle different defaults for severity of lints 2024-12-11 20:48:41 +02:00
tests.rs Resolve included files to their calling modules in IDE layer 2024-08-12 13:45:33 +02:00