mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Switch to variant-granularity field type inference
This commit is contained in:
parent
f16cff3cad
commit
d06904e90c
10 changed files with 68 additions and 42 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue