mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Insert unnamed consts to ChildBySource DynMap
This commit is contained in:
parent
354151df35
commit
ec2895e956
2 changed files with 5 additions and 1 deletions
|
@ -80,6 +80,10 @@ impl ChildBySource for ModuleId {
|
|||
impl ChildBySource for ItemScope {
|
||||
fn child_by_source_to(&self, db: &dyn DefDatabase, res: &mut DynMap) {
|
||||
self.declarations().for_each(|item| add_module_def(db, res, item));
|
||||
self.unnamed_consts().for_each(|konst| {
|
||||
let src = konst.lookup(db).source(db);
|
||||
res[keys::CONST].insert(src, konst);
|
||||
});
|
||||
self.impls().for_each(|imp| add_impl(db, res, imp));
|
||||
|
||||
fn add_module_def(db: &dyn DefDatabase, map: &mut DynMap, item: ModuleDefId) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue