aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorFedor Sakharov <[email protected]>2020-05-06 15:17:35 +0100
committerFedor Sakharov <[email protected]>2020-05-06 15:35:22 +0100
commitbd9f1f7eb78843ddd91d259a04e988b0681a5db4 (patch)
treee9fcabf13e376266b3a7065743fa3392dfdb53e9 /crates/ra_hir
parentefd8e34c396f1524623a495e47111f1047cf2879 (diff)
Fix rename of enum variant visible from module
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 {