diff options
author | Edwin Cheng <[email protected]> | 2020-05-04 18:19:54 +0100 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-05-04 18:19:54 +0100 |
commit | cf821cc33271b3a133ea3b3775f86573aa2514cb (patch) | |
tree | 4f4b143fd5cc641d4f18324b7f2aea156fbd4583 /crates/ra_hir_def/src | |
parent | e921195d93c443b20a6fcb3cb1c5b8117fe2fa1b (diff) |
Change union resolve types only
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/item_scope.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs index 954f2542a..7792ed709 100644 --- a/crates/ra_hir_def/src/item_scope.rs +++ b/crates/ra_hir_def/src/item_scope.rs | |||
@@ -156,7 +156,7 @@ impl PerNs { | |||
156 | ModuleDefId::ModuleId(_) => PerNs::types(def, v), | 156 | ModuleDefId::ModuleId(_) => PerNs::types(def, v), |
157 | ModuleDefId::FunctionId(_) => PerNs::values(def, v), | 157 | ModuleDefId::FunctionId(_) => PerNs::values(def, v), |
158 | ModuleDefId::AdtId(adt) => match adt { | 158 | ModuleDefId::AdtId(adt) => match adt { |
159 | AdtId::UnionId(_) => PerNs::both(def, 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 { |
diff --git a/crates/ra_hir_def/src/nameres/tests.rs b/crates/ra_hir_def/src/nameres/tests.rs index 83120fa36..1b66c1aac 100644 --- a/crates/ra_hir_def/src/nameres/tests.rs +++ b/crates/ra_hir_def/src/nameres/tests.rs | |||
@@ -67,7 +67,7 @@ fn crate_def_map_smoke_test() { | |||
67 | ⋮Baz: t v | 67 | ⋮Baz: t v |
68 | ⋮E: t | 68 | ⋮E: t |
69 | ⋮EXT: v | 69 | ⋮EXT: v |
70 | ⋮U: t v | 70 | ⋮U: t |
71 | ⋮ext: v | 71 | ⋮ext: v |
72 | "###) | 72 | "###) |
73 | } | 73 | } |