diff options
author | Aleksey Kladov <[email protected]> | 2019-11-24 20:48:39 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-24 21:12:36 +0000 |
commit | d06904e90cdc1603ffcb714e70dab83905221f72 (patch) | |
tree | edd220cc84f504072d7154994cdd56a787625b5e /crates/ra_hir/src/code_model.rs | |
parent | f16cff3cad931d48a5516b2aec468cfddbed7dd1 (diff) |
Switch to variant-granularity field type inference
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index ab0544a4c..3f44a50c4 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -305,7 +305,7 @@ impl StructField { | |||
305 | } | 305 | } |
306 | 306 | ||
307 | pub fn ty(&self, db: &impl HirDatabase) -> Ty { | 307 | pub fn ty(&self, db: &impl HirDatabase) -> Ty { |
308 | db.type_for_field(*self) | 308 | db.field_types(self.parent.into())[self.id].clone() |
309 | } | 309 | } |
310 | 310 | ||
311 | pub fn parent_def(&self, _db: &impl HirDatabase) -> VariantDef { | 311 | pub fn parent_def(&self, _db: &impl HirDatabase) -> VariantDef { |