diff options
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r-- | crates/hir_def/src/resolver.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/hir_def/src/resolver.rs b/crates/hir_def/src/resolver.rs index 47e56259f..49c573087 100644 --- a/crates/hir_def/src/resolver.rs +++ b/crates/hir_def/src/resolver.rs | |||
@@ -640,8 +640,7 @@ pub trait HasResolver: Copy { | |||
640 | impl HasResolver for ModuleId { | 640 | impl HasResolver for ModuleId { |
641 | fn resolver(self, db: &dyn DefDatabase) -> Resolver { | 641 | fn resolver(self, db: &dyn DefDatabase) -> Resolver { |
642 | let mut def_map = self.def_map(db); | 642 | let mut def_map = self.def_map(db); |
643 | let mut modules = Vec::new(); | 643 | let mut modules = vec![(def_map.clone(), self.local_id)]; |
644 | modules.push((def_map.clone(), self.local_id)); | ||
645 | while let Some(parent) = def_map.parent() { | 644 | while let Some(parent) = def_map.parent() { |
646 | def_map = parent.def_map(db); | 645 | def_map = parent.def_map(db); |
647 | modules.push((def_map.clone(), parent.local_id)); | 646 | modules.push((def_map.clone(), parent.local_id)); |