diff options
author | Aleksey Kladov <[email protected]> | 2021-04-30 09:52:31 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-04-30 09:52:31 +0100 |
commit | cb3ef552e873a86e94a3792160fadb5d937a6f5f (patch) | |
tree | b19bf27eb2f6ed299d4095a43a8b618fbf347d7d /crates/ide_completion | |
parent | 49b219b1035e20143818d409404b5e6f19a7ad1d (diff) |
internal: normalize name
All def types in hir are unsubstituted
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/context.rs | 4 | ||||
-rw-r--r-- | crates/ide_completion/src/render/enum_variant.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs index 32f81aec1..b005bd773 100644 --- a/crates/ide_completion/src/context.rs +++ b/crates/ide_completion/src/context.rs | |||
@@ -347,7 +347,7 @@ impl<'a> CompletionContext<'a> { | |||
347 | .and_then(|node| ast::RecordExprField::cast(node)) | 347 | .and_then(|node| ast::RecordExprField::cast(node)) |
348 | .and_then(|rf| self.sema.resolve_record_field(&rf).zip(Some(rf))) | 348 | .and_then(|rf| self.sema.resolve_record_field(&rf).zip(Some(rf))) |
349 | .map(|(f, rf)|( | 349 | .map(|(f, rf)|( |
350 | Some(f.0.signature_ty(self.db)), | 350 | Some(f.0.ty(self.db)), |
351 | rf.field_name().map(NameOrNameRef::NameRef), | 351 | rf.field_name().map(NameOrNameRef::NameRef), |
352 | )) | 352 | )) |
353 | .unwrap_or((None, None)) | 353 | .unwrap_or((None, None)) |
@@ -357,7 +357,7 @@ impl<'a> CompletionContext<'a> { | |||
357 | self.sema | 357 | self.sema |
358 | .resolve_record_field(&it) | 358 | .resolve_record_field(&it) |
359 | .map(|f|( | 359 | .map(|f|( |
360 | Some(f.0.signature_ty(self.db)), | 360 | Some(f.0.ty(self.db)), |
361 | it.field_name().map(NameOrNameRef::NameRef), | 361 | it.field_name().map(NameOrNameRef::NameRef), |
362 | )) | 362 | )) |
363 | .unwrap_or((None, None)) | 363 | .unwrap_or((None, None)) |
diff --git a/crates/ide_completion/src/render/enum_variant.rs b/crates/ide_completion/src/render/enum_variant.rs index 832f5ced1..0c0c71134 100644 --- a/crates/ide_completion/src/render/enum_variant.rs +++ b/crates/ide_completion/src/render/enum_variant.rs | |||
@@ -93,7 +93,7 @@ impl<'a> EnumRender<'a> { | |||
93 | .variant | 93 | .variant |
94 | .fields(self.ctx.db()) | 94 | .fields(self.ctx.db()) |
95 | .into_iter() | 95 | .into_iter() |
96 | .map(|field| (field.name(self.ctx.db()), field.signature_ty(self.ctx.db()))); | 96 | .map(|field| (field.name(self.ctx.db()), field.ty(self.ctx.db()))); |
97 | 97 | ||
98 | match self.variant_kind { | 98 | match self.variant_kind { |
99 | StructKind::Tuple | StructKind::Unit => format!( | 99 | StructKind::Tuple | StructKind::Unit => format!( |