diff options
Diffstat (limited to 'crates/ra_hir_def/src/child_by_source.rs')
-rw-r--r-- | crates/ra_hir_def/src/child_by_source.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/child_by_source.rs b/crates/ra_hir_def/src/child_by_source.rs index eba361578..3c9379b15 100644 --- a/crates/ra_hir_def/src/child_by_source.rs +++ b/crates/ra_hir_def/src/child_by_source.rs | |||
@@ -103,8 +103,14 @@ impl ChildBySource for ModuleId { | |||
103 | let src = strukt.lookup(db).source(db); | 103 | let src = strukt.lookup(db).source(db); |
104 | res[keys::STRUCT].insert(src, strukt) | 104 | res[keys::STRUCT].insert(src, strukt) |
105 | } | 105 | } |
106 | AdtId::UnionId(_) => (), | 106 | AdtId::UnionId(union_) => { |
107 | AdtId::EnumId(_) => (), | 107 | let src = union_.lookup(db).source(db); |
108 | res[keys::UNION].insert(src, union_) | ||
109 | } | ||
110 | AdtId::EnumId(enum_) => { | ||
111 | let src = enum_.lookup(db).source(db); | ||
112 | res[keys::ENUM].insert(src, enum_) | ||
113 | } | ||
108 | }, | 114 | }, |
109 | _ => (), | 115 | _ => (), |
110 | } | 116 | } |