diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-20 06:44:37 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-20 06:44:37 +0000 |
commit | 4dae39a609fb58b42cbe152e66d30fe6471a34d7 (patch) | |
tree | 166ee3c45f99611f7c20740c2a246f5b3bed41a3 /crates/ra_hir_def/src/adt.rs | |
parent | eec68e6f451ee7675ce2cb29b696df091e6aed13 (diff) | |
parent | 36e3fc9d5413f7e6e17e82867aae1318645880a3 (diff) |
Merge #2319
2319: Rename Source::ast -> Source::value r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/adt.rs')
-rw-r--r-- | crates/ra_hir_def/src/adt.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index a29c4d41e..d04f54e15 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs | |||
@@ -54,8 +54,8 @@ impl StructData { | |||
54 | id: StructOrUnionId, | 54 | id: StructOrUnionId, |
55 | ) -> Arc<StructData> { | 55 | ) -> Arc<StructData> { |
56 | let src = id.source(db); | 56 | let src = id.source(db); |
57 | let name = src.ast.name().map(|n| n.as_name()); | 57 | let name = src.value.name().map(|n| n.as_name()); |
58 | let variant_data = VariantData::new(src.ast.kind()); | 58 | let variant_data = VariantData::new(src.value.kind()); |
59 | let variant_data = Arc::new(variant_data); | 59 | let variant_data = Arc::new(variant_data); |
60 | Arc::new(StructData { name, variant_data }) | 60 | Arc::new(StructData { name, variant_data }) |
61 | } | 61 | } |
@@ -64,9 +64,9 @@ impl StructData { | |||
64 | impl EnumData { | 64 | impl EnumData { |
65 | pub(crate) fn enum_data_query(db: &impl DefDatabase2, e: EnumId) -> Arc<EnumData> { | 65 | pub(crate) fn enum_data_query(db: &impl DefDatabase2, e: EnumId) -> Arc<EnumData> { |
66 | let src = e.source(db); | 66 | let src = e.source(db); |
67 | let name = src.ast.name().map(|n| n.as_name()); | 67 | let name = src.value.name().map(|n| n.as_name()); |
68 | let variants = src | 68 | let variants = src |
69 | .ast | 69 | .value |
70 | .variant_list() | 70 | .variant_list() |
71 | .into_iter() | 71 | .into_iter() |
72 | .flat_map(|it| it.variants()) | 72 | .flat_map(|it| it.variants()) |