aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db/src/defs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_db/src/defs.rs')
-rw-r--r--crates/ra_ide_db/src/defs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs
index 853d856e7..1826f3ac6 100644
--- a/crates/ra_ide_db/src/defs.rs
+++ b/crates/ra_ide_db/src/defs.rs
@@ -93,14 +93,14 @@ impl NameClass {
93 match self { 93 match self {
94 NameClass::Definition(it) => Some(it), 94 NameClass::Definition(it) => Some(it),
95 NameClass::ConstReference(_) => None, 95 NameClass::ConstReference(_) => None,
96 NameClass::FieldShorthand { local: _, field } => Some(field), 96 NameClass::FieldShorthand { local, field: _ } => Some(Definition::Local(local)),
97 } 97 }
98 } 98 }
99 99
100 pub fn definition(self) -> Definition { 100 pub fn definition(self) -> Definition {
101 match self { 101 match self {
102 NameClass::Definition(it) | NameClass::ConstReference(it) => it, 102 NameClass::Definition(it) | NameClass::ConstReference(it) => it,
103 NameClass::FieldShorthand { local, field: _ } => Definition::Local(local), 103 NameClass::FieldShorthand { local: _, field } => field,
104 } 104 }
105 } 105 }
106} 106}