From bd9f1f7eb78843ddd91d259a04e988b0681a5db4 Mon Sep 17 00:00:00 2001 From: Fedor Sakharov Date: Wed, 6 May 2020 17:17:35 +0300 Subject: Fix rename of enum variant visible from module --- crates/ra_hir/src/code_model.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crates/ra_hir') 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 { } } +impl HasVisibility for EnumVariant { + fn visibility(&self, db: &dyn HirDatabase) -> Visibility { + let visibility = &db.enum_data(self.parent.id).visibility; + visibility.resolve(db.upcast(), &self.parent.id.resolver(db.upcast())) + } +} + /// A Data Type #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub enum Adt { -- cgit v1.2.3