diff options
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/module.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model_impl/module.rs b/crates/ra_hir/src/code_model_impl/module.rs index 8668d6c8a..331b0500e 100644 --- a/crates/ra_hir/src/code_model_impl/module.rs +++ b/crates/ra_hir/src/code_model_impl/module.rs | |||
@@ -148,13 +148,13 @@ impl Module { | |||
148 | } else { | 148 | } else { |
149 | return Ok(PerNs::none()); | 149 | return Ok(PerNs::none()); |
150 | }; | 150 | }; |
151 | let module = match curr.resolve(db)? { | 151 | let module = match curr.resolve(db) { |
152 | Def::Module(it) => it, | 152 | Def::Module(it) => it, |
153 | Def::Enum(e) => { | 153 | Def::Enum(e) => { |
154 | if segments.len() == idx + 1 { | 154 | if segments.len() == idx + 1 { |
155 | // enum variant | 155 | // enum variant |
156 | let matching_variant = | 156 | let matching_variant = |
157 | e.variants(db)?.into_iter().find(|(n, _variant)| n == name); | 157 | e.variants(db).into_iter().find(|(n, _variant)| n == name); |
158 | 158 | ||
159 | if let Some((_n, variant)) = matching_variant { | 159 | if let Some((_n, variant)) = matching_variant { |
160 | return Ok(PerNs::both(variant.def_id(), e.def_id())); | 160 | return Ok(PerNs::both(variant.def_id(), e.def_id())); |