rust-analyzer/crates/hir-def/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
..
body Merge pull request #18708 from ChayimFriedman2/fix-tiny 2024-12-18 07:41:09 +00:00
data Build source map for hir_def::TypeRefs 2024-10-25 06:15:04 +03:00
hir Report unresolved idents for implicit captures in format_args!() 2024-12-16 10:10:26 +02:00
item_tree Parse lifetime bounds in lifetime param into TypeBoundList 2024-12-05 17:52:02 +01:00
macro_expansion_tests Rename test fixture crates to ra_test_fixture 2024-12-09 11:40:21 +01:00
nameres Unify handling of path diagnostics in hir-ty 2024-12-24 18:58:52 +02:00
path Lay the foundation for diagnostics in ty lowering, and implement a first diagnostic 2024-12-04 14:22:56 +02:00
attr.rs Lift out workspace related data into a separate query to preserve crategraph deduplication 2024-09-11 12:16:41 +02:00
body.rs Report unresolved idents for implicit captures in format_args!() 2024-12-16 10:10:26 +02:00
builtin_type.rs Switch token trees to use Symbols 2024-07-16 10:11:59 +02:00
data.rs Store some hir_def Paths in the type ref source maps 2024-12-04 14:09:50 +02:00
db.rs Build source map for hir_def::TypeRefs 2024-10-25 06:15:04 +03:00
dyn_map.rs Move child_by_source from hir-def to hir 2024-10-31 09:28:08 +01:00
expander.rs Cleanup TypeRef lowering 2024-10-28 17:38:37 +02:00
find_path.rs fix: Prevent public reexport of private item 2024-10-24 04:26:17 +09:00
generics.rs Complete diagnostics in ty lowering groundwork 2024-12-04 14:22:56 +02:00
hir.rs Shrink Path to 16 bytes 2024-10-25 06:44:56 +03:00
import_map.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
item_scope.rs Use a record struct instead of a tuple for each namespace in PerNs 2024-12-16 22:39:50 +02:00
item_tree.rs Merge pull request #18413 from ShoyuVanilla/extern-crate-reexport 2024-10-28 13:51:26 +00:00
lang_item.rs Support AsyncFnX traits 2024-12-03 21:26:26 +02:00
lib.rs Store some hir_def Paths in the type ref source maps 2024-12-04 14:09:50 +02:00
lower.rs Store some hir_def Paths in the type ref source maps 2024-12-04 14:09:50 +02:00
nameres.rs Unify handling of path diagnostics in hir-ty 2024-12-24 18:58:52 +02:00
path.rs Unify handling of path diagnostics in hir-ty 2024-12-24 18:58:52 +02:00
per_ns.rs Use a record struct instead of a tuple for each namespace in PerNs 2024-12-16 22:39:50 +02:00
pretty.rs Store some hir_def Paths in the type ref source maps 2024-12-04 14:09:50 +02:00
resolver.rs Unify handling of path diagnostics in hir-ty 2024-12-24 18:58:52 +02:00
src.rs Remove unused trace module 2024-07-25 14:08:48 +02:00
test_db.rs Rename test fixture crates to ra_test_fixture 2024-12-09 11:40:21 +01:00
visibility.rs fix: Prevent public reexport of private item 2024-10-24 04:26:17 +09:00