From 6294fd5ec9c6946bdd91f1274956c573f9f2a136 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 9 Nov 2019 15:34:00 +0300 Subject: Unfork struct and union ids --- crates/ra_hir/src/ty/lower.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/ty') diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs index d26b16cb2..1fed5025e 100644 --- a/crates/ra_hir/src/ty/lower.rs +++ b/crates/ra_hir/src/ty/lower.rs @@ -665,7 +665,7 @@ fn type_for_builtin(def: BuiltinType) -> Ty { } fn fn_sig_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> FnSig { - let struct_data = db.struct_data(def.id); + let struct_data = db.struct_data(def.id.into()); let fields = match struct_data.variant_data.fields() { Some(fields) => fields, None => panic!("fn_sig_for_struct_constructor called on unit struct"), @@ -681,7 +681,7 @@ fn fn_sig_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> FnSig { /// Build the type of a tuple struct constructor. fn type_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> Ty { - let struct_data = db.struct_data(def.id); + let struct_data = db.struct_data(def.id.into()); if struct_data.variant_data.fields().is_none() { return type_for_adt(db, def); // Unit struct } -- cgit v1.2.3