aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 5f480c304..7eba0b233 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -474,6 +474,13 @@ impl EnumVariant {
474 } 474 }
475} 475}
476 476
477impl HasVisibility for EnumVariant {
478 fn visibility(&self, db: &dyn HirDatabase) -> Visibility {
479 let visibility = &db.enum_data(self.parent.id).visibility;
480 visibility.resolve(db.upcast(), &self.parent.id.resolver(db.upcast()))
481 }
482}
483
477/// A Data Type 484/// A Data Type
478#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] 485#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
479pub enum Adt { 486pub enum Adt {