rust-analyzer/crates/ra_hir_def/src
Aleksey Kladov cebeedc66f Next gen IDs for functions
The current system with AstIds has two primaraly drawbacks:

* It is possible to manufacture IDs out of thin air.
  For example, it's possible to create IDs for items which are not
  considered in CrateDefMap due to cfg. Or it is possible to mixup
  structs and unions, because they share ID space.

* Getting the ID of a parent requires a secondary index.

Instead, the plan is to pursue the more traditional approach, where
each items stores the id of the parent declaration. This makes
`FromSource` more awkward, but also more correct: now, to get from an
AST to HIR, we first do this recursively for the parent item, and the
just search the children of the parent for the matching def
2019-11-20 16:22:58 +03:00
..
body Rename Source::ast -> Source::value 2019-11-20 09:42:30 +03:00
nameres Next gen IDs for functions 2019-11-20 16:22:58 +03:00
adt.rs Rename Source::ast -> Source::value 2019-11-20 09:42:30 +03:00
attr.rs move hygiene to hir_expand 2019-10-30 19:10:53 +03:00
body.rs Next gen IDs for functions 2019-11-20 16:22:58 +03:00
builtin_type.rs Move definition of exprs to hir_def 2019-11-12 15:09:25 +03:00
db.rs Next gen IDs for functions 2019-11-20 16:22:58 +03:00
diagnostics.rs Rename Source::ast -> Source::value 2019-11-20 09:42:30 +03:00
expr.rs Add helpful pointer to module docs 2019-11-12 18:53:26 +03:00
generics.rs Next gen IDs for functions 2019-11-20 16:22:58 +03:00
impls.rs Next gen IDs for functions 2019-11-20 16:22:58 +03:00
lib.rs Next gen IDs for functions 2019-11-20 16:22:58 +03:00
marks.rs Restore crate_def_map marks 2019-11-03 23:44:23 +03:00
nameres.rs Move traits to hir_def 2019-11-20 14:22:38 +03:00
path.rs Rename Source::ast -> Source::value 2019-11-20 09:42:30 +03:00
test_db.rs Reexport relative_path from ra_db 2019-11-04 01:14:17 +03:00
traits.rs Next gen IDs for functions 2019-11-20 16:22:58 +03:00
type_ref.rs move raw_items to hir_def 2019-10-30 17:43:11 +03:00