diff options
author | Edwin Cheng <[email protected]> | 2020-05-05 16:01:07 +0100 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-05-05 16:01:07 +0100 |
commit | 07de8ea165deb37ca9c42e66d2d3ecac57756ec6 (patch) | |
tree | 00f47b2a82c260266d73ff876c06da1a3560644f /crates | |
parent | cf821cc33271b3a133ea3b3775f86573aa2514cb (diff) |
invert if
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir_def/src/item_scope.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs index 7792ed709..fc15948ad 100644 --- a/crates/ra_hir_def/src/item_scope.rs +++ b/crates/ra_hir_def/src/item_scope.rs | |||
@@ -159,10 +159,10 @@ impl PerNs { | |||
159 | AdtId::UnionId(_) => PerNs::types(def, v), | 159 | AdtId::UnionId(_) => PerNs::types(def, v), |
160 | AdtId::EnumId(_) => PerNs::types(def, v), | 160 | AdtId::EnumId(_) => PerNs::types(def, v), |
161 | AdtId::StructId(_) => { | 161 | AdtId::StructId(_) => { |
162 | if !has_constructor { | 162 | if has_constructor { |
163 | PerNs::types(def, v) | ||
164 | } else { | ||
165 | PerNs::both(def, def, v) | 163 | PerNs::both(def, def, v) |
164 | } else { | ||
165 | PerNs::types(def, v) | ||
166 | } | 166 | } |
167 | } | 167 | } |
168 | }, | 168 | }, |