aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db/src
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_ide_db/src
parentefd8e34c396f1524623a495e47111f1047cf2879 (diff)
Fix rename of enum variant visible from module
Diffstat (limited to 'crates/ra_ide_db/src')
-rw-r--r--crates/ra_ide_db/src/defs.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs
index 40d0e77b5..2e2850efb 100644
--- a/crates/ra_ide_db/src/defs.rs
+++ b/crates/ra_ide_db/src/defs.rs
@@ -47,7 +47,10 @@ impl Definition {
47 match self { 47 match self {
48 Definition::Macro(_) => None, 48 Definition::Macro(_) => None,
49 Definition::Field(sf) => Some(sf.visibility(db)), 49 Definition::Field(sf) => Some(sf.visibility(db)),
50 Definition::ModuleDef(def) => module?.visibility_of(db, def), 50 Definition::ModuleDef(def) => match def {
51 ModuleDef::EnumVariant(id) => Some(id.visibility(db)),
52 _ => module?.visibility_of(db, def),
53 },
51 Definition::SelfType(_) => None, 54 Definition::SelfType(_) => None,
52 Definition::Local(_) => None, 55 Definition::Local(_) => None,
53 Definition::TypeParam(_) => None, 56 Definition::TypeParam(_) => None,