From 4edf736eb23c2d94a8c65a83a83201590e847b3f Mon Sep 17 00:00:00 2001 From: unexge Date: Mon, 8 Jun 2020 15:37:12 +0300 Subject: Swap `into_definition` and `definition` semantics for `FieldShorthand` variant --- crates/ra_ide_db/src/defs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_db/src') 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 { match self { NameClass::Definition(it) => Some(it), NameClass::ConstReference(_) => None, - NameClass::FieldShorthand { local: _, field } => Some(field), + NameClass::FieldShorthand { local, field: _ } => Some(Definition::Local(local)), } } pub fn definition(self) -> Definition { match self { NameClass::Definition(it) | NameClass::ConstReference(it) => it, - NameClass::FieldShorthand { local, field: _ } => Definition::Local(local), + NameClass::FieldShorthand { local: _, field } => field, } } } -- cgit v1.2.3