aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorFedor Sakharov <[email protected]>2020-05-07 14:30:20 +0100
committerFedor Sakharov <[email protected]>2020-05-07 14:31:51 +0100
commit210f0cbd27b0621c47e15c74bbb16ab47a642999 (patch)
tree29254a5781765ac930e413bfee99f8d6abca1148 /crates/ra_hir_def
parentbd9f1f7eb78843ddd91d259a04e988b0681a5db4 (diff)
Remove HasVisibility implementation
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/src/adt.rs4
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)]
34pub struct EnumData { 34pub 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> {