diff options
author | Seivan Heidari <[email protected]> | 2019-10-31 16:40:39 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-10-31 16:40:39 +0000 |
commit | 1b6c68e51fcbba59c2e99c31d1400cbd6d44f928 (patch) | |
tree | bdf28d44b2908a62b49a3f2bb1995187f45e42c4 /crates/ra_hir/src/ty/lower.rs | |
parent | a437f0e5849d8ce0a14d40a55f2ac2166f5ec343 (diff) | |
parent | 5451bfb9a1c6482822bdd7883434b9230affd2ea (diff) |
Merge branch 'master' into feature/themes
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r-- | crates/ra_hir/src/ty/lower.rs | 8 |
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 | ||
657 | fn fn_sig_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> FnSig { | 657 | fn 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. |
673 | fn type_for_struct_constructor(db: &impl HirDatabase, def: Struct) -> Ty { | 673 | fn 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); |