aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r--crates/ra_hir/src/ty/lower.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs
index dd7cd979f..8e2834307 100644
--- a/crates/ra_hir/src/ty/lower.rs
+++ b/crates/ra_hir/src/ty/lower.rs
@@ -655,8 +655,8 @@ fn type_for_builtin(def: BuiltinType) -> Ty {
655} 655}
656 656
657fn fn_sig_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> FnSig { 657fn fn_sig_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> FnSig {
658 let var_data = def.variant_data(db); 658 let struct_data = db.struct_data(def.id);
659 let fields = match var_data.fields() { 659 let fields = match struct_data.variant_data.fields() {
660 Some(fields) => fields, 660 Some(fields) => fields,
661 None => panic!("fn_sig_for_struct_constructor called on unit struct"), 661 None => panic!("fn_sig_for_struct_constructor called on unit struct"),
662 }; 662 };
@@ -671,8 +671,8 @@ fn fn_sig_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> FnSig {
671 671
672/// Build the type of a tuple struct constructor. 672/// Build the type of a tuple struct constructor.
673fn type_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> Ty { 673fn type_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> Ty {
674 let var_data = def.variant_data(db); 674 let struct_data = db.struct_data(def.id);
675 if var_data.fields().is_none() { 675 if struct_data.variant_data.fields().is_none() {
676 return type_for_adt(db, def); // Unit struct 676 return type_for_adt(db, def); // Unit struct
677 } 677 }
678 let generics = def.generic_params(db); 678 let generics = def.generic_params(db);