mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Move to top
This commit is contained in:
parent
ff75ad13a4
commit
b70b6bce19
1 changed files with 13 additions and 13 deletions
|
@ -22,6 +22,19 @@ use crate::{
|
||||||
input::SourceRootId,
|
input::SourceRootId,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Item map is the result of the name resolution. Item map contains, for each
|
||||||
|
/// module, the set of visible items.
|
||||||
|
#[derive(Default, Debug, PartialEq, Eq)]
|
||||||
|
pub(crate) struct ItemMap {
|
||||||
|
per_module: FxHashMap<ModuleId, ModuleItems>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Default, PartialEq, Eq)]
|
||||||
|
struct ModuleItems {
|
||||||
|
items: FxHashMap<SmolStr, Resolution>,
|
||||||
|
import_resolutions: FxHashMap<LocalSyntaxPtr, DefId>,
|
||||||
|
}
|
||||||
|
|
||||||
/// A set of items and imports declared inside a module, without relation to
|
/// A set of items and imports declared inside a module, without relation to
|
||||||
/// other modules.
|
/// other modules.
|
||||||
///
|
///
|
||||||
|
@ -101,19 +114,6 @@ pub(crate) fn item_map(
|
||||||
Ok(Arc::new(res))
|
Ok(Arc::new(res))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Item map is the result of the name resolution. Item map contains, for each
|
|
||||||
/// module, the set of visible items.
|
|
||||||
#[derive(Default, Debug, PartialEq, Eq)]
|
|
||||||
pub(crate) struct ItemMap {
|
|
||||||
per_module: FxHashMap<ModuleId, ModuleItems>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Default, PartialEq, Eq)]
|
|
||||||
struct ModuleItems {
|
|
||||||
items: FxHashMap<SmolStr, Resolution>,
|
|
||||||
import_resolutions: FxHashMap<LocalSyntaxPtr, DefId>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Resolution is basically `DefId` atm, but it should account for stuff like
|
/// Resolution is basically `DefId` atm, but it should account for stuff like
|
||||||
/// multiple namespaces, ambiguity and errors.
|
/// multiple namespaces, ambiguity and errors.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue