Skip to content

Commit b70b6bc

Browse files
committed
Move to top
1 parent ff75ad1 commit b70b6bc

File tree

1 file changed

+13
-13
lines changed
  • crates/ra_analysis/src/descriptors/module

1 file changed

+13
-13
lines changed

crates/ra_analysis/src/descriptors/module/nameres.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ use crate::{
2222
input::SourceRootId,
2323
};
2424

25+
/// Item map is the result of the name resolution. Item map contains, for each
26+
/// module, the set of visible items.
27+
#[derive(Default, Debug, PartialEq, Eq)]
28+
pub(crate) struct ItemMap {
29+
per_module: FxHashMap<ModuleId, ModuleItems>,
30+
}
31+
32+
#[derive(Debug, Default, PartialEq, Eq)]
33+
struct ModuleItems {
34+
items: FxHashMap<SmolStr, Resolution>,
35+
import_resolutions: FxHashMap<LocalSyntaxPtr, DefId>,
36+
}
37+
2538
/// A set of items and imports declared inside a module, without relation to
2639
/// other modules.
2740
///
@@ -101,19 +114,6 @@ pub(crate) fn item_map(
101114
Ok(Arc::new(res))
102115
}
103116

104-
/// Item map is the result of the name resolution. Item map contains, for each
105-
/// module, the set of visible items.
106-
#[derive(Default, Debug, PartialEq, Eq)]
107-
pub(crate) struct ItemMap {
108-
per_module: FxHashMap<ModuleId, ModuleItems>,
109-
}
110-
111-
#[derive(Debug, Default, PartialEq, Eq)]
112-
struct ModuleItems {
113-
items: FxHashMap<SmolStr, Resolution>,
114-
import_resolutions: FxHashMap<LocalSyntaxPtr, DefId>,
115-
}
116-
117117
/// Resolution is basically `DefId` atm, but it should account for stuff like
118118
/// multiple namespaces, ambiguity and errors.
119119
#[derive(Debug, Clone, PartialEq, Eq)]

0 commit comments

Comments
 (0)