aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/item_tree
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 16:56:53 +0100
committerAleksey Kladov <[email protected]>2020-07-30 16:56:53 +0100
commit1766aae145c6925a33e427f2fe6ef2a56c301665 (patch)
treedfcf22990794a5990602a468b862d544fbe63f0a /crates/ra_hir_def/src/item_tree
parent609680ef97dbf82c07b6b06e21aa366423892304 (diff)
Rename EnumVariant -> Variant
Diffstat (limited to 'crates/ra_hir_def/src/item_tree')
-rw-r--r--crates/ra_hir_def/src/item_tree/lower.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs
index da7238416..6d963c852 100644
--- a/crates/ra_hir_def/src/item_tree/lower.rs
+++ b/crates/ra_hir_def/src/item_tree/lower.rs
@@ -259,7 +259,7 @@ impl Ctx {
259 Some(id(self.data().enums.alloc(res))) 259 Some(id(self.data().enums.alloc(res)))
260 } 260 }
261 261
262 fn lower_variants(&mut self, variants: &ast::EnumVariantList) -> IdRange<Variant> { 262 fn lower_variants(&mut self, variants: &ast::VariantList) -> IdRange<Variant> {
263 let start = self.next_variant_idx(); 263 let start = self.next_variant_idx();
264 for variant in variants.variants() { 264 for variant in variants.variants() {
265 if let Some(data) = self.lower_variant(&variant) { 265 if let Some(data) = self.lower_variant(&variant) {
@@ -271,7 +271,7 @@ impl Ctx {
271 IdRange::new(start..end) 271 IdRange::new(start..end)
272 } 272 }
273 273
274 fn lower_variant(&mut self, variant: &ast::EnumVariant) -> Option<Variant> { 274 fn lower_variant(&mut self, variant: &ast::Variant) -> Option<Variant> {
275 let name = variant.name()?.as_name(); 275 let name = variant.name()?.as_name();
276 let fields = self.lower_fields(&variant.kind()); 276 let fields = self.lower_fields(&variant.kind());
277 let res = Variant { name, fields }; 277 let res = Variant { name, fields };