Remove TypeRef from item opts which implement TypeAscriptionOwner

This commit is contained in:
Ville Penttinen 2019-02-27 14:00:08 +02:00
parent 52054e1140
commit d3ce69aee3
6 changed files with 24 additions and 43 deletions

View file

@ -6,7 +6,7 @@ use std::sync::Arc;
use ra_arena::{RawId, Arena, impl_arena_id};
use ra_syntax::{
TreeArc,
ast::{self, NameOwner, StructFlavor}
ast::{self, NameOwner, StructFlavor, TypeAscriptionOwner}
};
use crate::{
@ -164,7 +164,7 @@ impl VariantData {
.fields()
.map(|fd| StructFieldData {
name: fd.name().map(|n| n.as_name()).unwrap_or_else(Name::missing),
type_ref: TypeRef::from_ast_opt(fd.type_ref()),
type_ref: TypeRef::from_ast_opt(fd.ascribed_type()),
})
.collect();
VariantDataInner::Struct(fields)