internal: normalize name

All def types in hir are unsubstituted
This commit is contained in:
Aleksey Kladov 2021-04-30 11:52:31 +03:00
parent 49b219b103
commit cb3ef552e8
5 changed files with 6 additions and 6 deletions

View file

@ -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))