mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 12:33:33 +00:00
cc11e1a796
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". |
||
---|---|---|
.. | ||
body | ||
data | ||
hir | ||
item_tree | ||
macro_expansion_tests | ||
nameres | ||
path | ||
attr.rs | ||
body.rs | ||
builtin_type.rs | ||
data.rs | ||
db.rs | ||
dyn_map.rs | ||
expander.rs | ||
find_path.rs | ||
generics.rs | ||
hir.rs | ||
import_map.rs | ||
item_scope.rs | ||
item_tree.rs | ||
lang_item.rs | ||
lib.rs | ||
lower.rs | ||
nameres.rs | ||
path.rs | ||
per_ns.rs | ||
pretty.rs | ||
resolver.rs | ||
src.rs | ||
test_db.rs | ||
visibility.rs |