Make resolutions a query.

This commit is contained in:
Camille GILLOT 2021-04-04 14:40:35 +02:00
parent 139f7ad637
commit 5d9f96ab27
13 changed files with 120 additions and 101 deletions

View file

@ -25,7 +25,7 @@ use tracing::debug;
/// Internally the `DefPathTable` holds a tree of `DefKey`s, where each `DefKey`
/// stores the `DefIndex` of its parent.
/// There is one `DefPathTable` for each crate.
#[derive(Clone, Default)]
#[derive(Clone, Default, Debug)]
pub struct DefPathTable {
index_to_key: IndexVec<DefIndex, DefKey>,
def_path_hashes: IndexVec<DefIndex, DefPathHash>,
@ -107,7 +107,7 @@ impl DefPathTable {
/// The definition table containing node definitions.
/// It holds the `DefPathTable` for `LocalDefId`s/`DefPath`s.
/// It also stores mappings to convert `LocalDefId`s to/from `HirId`s.
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct Definitions {
table: DefPathTable,