aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-04-30 09:52:31 +0100
committerAleksey Kladov <[email protected]>2021-04-30 09:52:31 +0100
commitcb3ef552e873a86e94a3792160fadb5d937a6f5f (patch)
treeb19bf27eb2f6ed299d4095a43a8b618fbf347d7d /crates/hir
parent49b219b1035e20143818d409404b5e6f19a7ad1d (diff)
internal: normalize name
All def types in hir are unsubstituted
Diffstat (limited to 'crates/hir')
-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(),