aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-25 14:34:15 +0000
committerAleksey Kladov <[email protected]>2019-11-25 14:50:49 +0000
commit1455663ea15ecbfbe87b4b5be6919aa35dd0b260 (patch)
treed051e9bb71631cca33a1b4c23bf3f2576d1c0f56 /crates/ra_hir/src
parent5fd68b592938b6a4c074146c1b22ea0f6908fe26 (diff)
Fixme for union fields
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/ty/infer/expr.rs2
-rw-r--r--crates/ra_hir/src/ty/lower.rs1
2 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/infer/expr.rs b/crates/ra_hir/src/ty/infer/expr.rs
index 1d6df2b7a..994a6d7e9 100644
--- a/crates/ra_hir/src/ty/infer/expr.rs
+++ b/crates/ra_hir/src/ty/infer/expr.rs
@@ -263,6 +263,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
263 .clone() 263 .clone()
264 .subst(&a_ty.parameters) 264 .subst(&a_ty.parameters)
265 }), 265 }),
266 // FIXME:
267 TypeCtor::Adt(Adt::Union(_)) => None,
266 _ => None, 268 _ => None,
267 }, 269 },
268 _ => None, 270 _ => None,
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs
index 89bc4b9ae..eb51d31bd 100644
--- a/crates/ra_hir/src/ty/lower.rs
+++ b/crates/ra_hir/src/ty/lower.rs
@@ -561,6 +561,7 @@ pub(crate) fn field_types_query(
561) -> Arc<ArenaMap<LocalStructFieldId, Ty>> { 561) -> Arc<ArenaMap<LocalStructFieldId, Ty>> {
562 let (resolver, var_data) = match variant_id { 562 let (resolver, var_data) = match variant_id {
563 VariantId::StructId(it) => (it.resolver(db), db.struct_data(it).variant_data.clone()), 563 VariantId::StructId(it) => (it.resolver(db), db.struct_data(it).variant_data.clone()),
564 VariantId::UnionId(it) => (it.resolver(db), db.union_data(it).variant_data.clone()),
564 VariantId::EnumVariantId(it) => ( 565 VariantId::EnumVariantId(it) => (
565 it.parent.resolver(db), 566 it.parent.resolver(db),
566 db.enum_data(it.parent).variants[it.local_id].variant_data.clone(), 567 db.enum_data(it.parent).variants[it.local_id].variant_data.clone(),