mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
internal: normalize name
All def types in hir are unsubstituted
This commit is contained in:
parent
49b219b103
commit
cb3ef552e8
5 changed files with 6 additions and 6 deletions
|
@ -347,7 +347,7 @@ impl<'a> CompletionContext<'a> {
|
|||
.and_then(|node| ast::RecordExprField::cast(node))
|
||||
.and_then(|rf| self.sema.resolve_record_field(&rf).zip(Some(rf)))
|
||||
.map(|(f, rf)|(
|
||||
Some(f.0.signature_ty(self.db)),
|
||||
Some(f.0.ty(self.db)),
|
||||
rf.field_name().map(NameOrNameRef::NameRef),
|
||||
))
|
||||
.unwrap_or((None, None))
|
||||
|
@ -357,7 +357,7 @@ impl<'a> CompletionContext<'a> {
|
|||
self.sema
|
||||
.resolve_record_field(&it)
|
||||
.map(|f|(
|
||||
Some(f.0.signature_ty(self.db)),
|
||||
Some(f.0.ty(self.db)),
|
||||
it.field_name().map(NameOrNameRef::NameRef),
|
||||
))
|
||||
.unwrap_or((None, None))
|
||||
|
|
|
@ -93,7 +93,7 @@ impl<'a> EnumRender<'a> {
|
|||
.variant
|
||||
.fields(self.ctx.db())
|
||||
.into_iter()
|
||||
.map(|field| (field.name(self.ctx.db()), field.signature_ty(self.ctx.db())));
|
||||
.map(|field| (field.name(self.ctx.db()), field.ty(self.ctx.db())));
|
||||
|
||||
match self.variant_kind {
|
||||
StructKind::Tuple | StructKind::Unit => format!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue