aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/adt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/adt.rs')
-rw-r--r--crates/ra_hir_def/src/adt.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs
index de07fc952..7fc4cd76e 100644
--- a/crates/ra_hir_def/src/adt.rs
+++ b/crates/ra_hir_def/src/adt.rs
@@ -54,6 +54,7 @@ pub struct StructFieldData {
54impl StructData { 54impl StructData {
55 pub(crate) fn struct_data_query(db: &dyn DefDatabase, id: StructId) -> Arc<StructData> { 55 pub(crate) fn struct_data_query(db: &dyn DefDatabase, id: StructId) -> Arc<StructData> {
56 let src = id.lookup(db).source(db); 56 let src = id.lookup(db).source(db);
57
57 let name = src.value.name().map_or_else(Name::missing, |n| n.as_name()); 58 let name = src.value.name().map_or_else(Name::missing, |n| n.as_name());
58 let variant_data = VariantData::new(db, src.map(|s| s.kind())); 59 let variant_data = VariantData::new(db, src.map(|s| s.kind()));
59 let variant_data = Arc::new(variant_data); 60 let variant_data = Arc::new(variant_data);