diff options
Diffstat (limited to 'crates/ra_hir_def/src/adt.rs')
-rw-r--r-- | crates/ra_hir_def/src/adt.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index 0fda4d6c9..2bc34d449 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs | |||
@@ -33,7 +33,6 @@ pub struct StructData { | |||
33 | #[derive(Debug, Clone, PartialEq, Eq)] | 33 | #[derive(Debug, Clone, PartialEq, Eq)] |
34 | pub struct EnumData { | 34 | pub struct EnumData { |
35 | pub name: Name, | 35 | pub name: Name, |
36 | pub visibility: RawVisibility, | ||
37 | pub variants: Arena<EnumVariantData>, | 36 | pub variants: Arena<EnumVariantData>, |
38 | } | 37 | } |
39 | 38 | ||
@@ -92,8 +91,7 @@ impl EnumData { | |||
92 | let name = src.value.name().map_or_else(Name::missing, |n| n.as_name()); | 91 | let name = src.value.name().map_or_else(Name::missing, |n| n.as_name()); |
93 | let mut trace = Trace::new_for_arena(); | 92 | let mut trace = Trace::new_for_arena(); |
94 | lower_enum(db, &mut trace, &src, e.lookup(db).container.module(db)); | 93 | lower_enum(db, &mut trace, &src, e.lookup(db).container.module(db)); |
95 | let visibility = RawVisibility::from_ast(db, src.with_value(src.value.visibility())); | 94 | Arc::new(EnumData { name, variants: trace.into_arena() }) |
96 | Arc::new(EnumData { name, visibility, variants: trace.into_arena() }) | ||
97 | } | 95 | } |
98 | 96 | ||
99 | pub fn variant(&self, name: &Name) -> Option<LocalEnumVariantId> { | 97 | pub fn variant(&self, name: &Name) -> Option<LocalEnumVariantId> { |