aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/display.rs2
-rw-r--r--crates/hir/src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/display.rs b/crates/hir/src/display.rs
index 01a4d205f..508ac37c2 100644
--- a/crates/hir/src/display.rs
+++ b/crates/hir/src/display.rs
@@ -170,7 +170,7 @@ impl HirDisplay for Field {
170 fn hir_fmt(&self, f: &mut HirFormatter) -> Result<(), HirDisplayError> { 170 fn hir_fmt(&self, f: &mut HirFormatter) -> Result<(), HirDisplayError> {
171 write_visibility(self.parent.module(f.db).id, self.visibility(f.db), f)?; 171 write_visibility(self.parent.module(f.db).id, self.visibility(f.db), f)?;
172 write!(f, "{}: ", self.name(f.db))?; 172 write!(f, "{}: ", self.name(f.db))?;
173 self.signature_ty(f.db).hir_fmt(f) 173 self.ty(f.db).hir_fmt(f)
174 } 174 }
175} 175}
176 176
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 0acfa582a..9eb7672da 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -509,7 +509,7 @@ impl Field {
509 /// placeholder types for type parameters). This is good for showing 509 /// placeholder types for type parameters). This is good for showing
510 /// signature help, but not so good to actually get the type of the field 510 /// signature help, but not so good to actually get the type of the field
511 /// when you actually have a variable of the struct. 511 /// when you actually have a variable of the struct.
512 pub fn signature_ty(&self, db: &dyn HirDatabase) -> Type { 512 pub fn ty(&self, db: &dyn HirDatabase) -> Type {
513 let var_id = self.parent.into(); 513 let var_id = self.parent.into();
514 let generic_def_id: GenericDefId = match self.parent { 514 let generic_def_id: GenericDefId = match self.parent {
515 VariantDef::Struct(it) => it.id.into(), 515 VariantDef::Struct(it) => it.id.into(),