diff options
author | Fedor Sakharov <[email protected]> | 2020-05-07 14:30:20 +0100 |
---|---|---|
committer | Fedor Sakharov <[email protected]> | 2020-05-07 14:31:51 +0100 |
commit | 210f0cbd27b0621c47e15c74bbb16ab47a642999 (patch) | |
tree | 29254a5781765ac930e413bfee99f8d6abca1148 /crates/ra_hir_def/src | |
parent | bd9f1f7eb78843ddd91d259a04e988b0681a5db4 (diff) |
Remove HasVisibility implementation
Diffstat (limited to 'crates/ra_hir_def/src')
-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> { |