Switch to variant-granularity field type inference

This commit is contained in:
Aleksey Kladov 2019-11-24 23:48:39 +03:00
parent f16cff3cad
commit d06904e90c
10 changed files with 68 additions and 42 deletions

View file

@ -305,7 +305,7 @@ impl StructField {
}
pub fn ty(&self, db: &impl HirDatabase) -> Ty {
db.type_for_field(*self)
db.field_types(self.parent.into())[self.id].clone()
}
pub fn parent_def(&self, _db: &impl HirDatabase) -> VariantDef {