From 7f09083c6ff3cb3499b140ffe85f83a06f685aed Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 29 Feb 2020 18:35:45 +0100 Subject: Handle tuple fields as well --- crates/ra_hir/src/semantics/source_to_def.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir/src/semantics') diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs index 303610dc4..884b535b2 100644 --- a/crates/ra_hir/src/semantics/source_to_def.rs +++ b/crates/ra_hir/src/semantics/source_to_def.rs @@ -94,13 +94,18 @@ impl SourceToDefCtx<'_, &'_ DB> { ) -> Option { self.to_def(src, keys::TYPE_ALIAS) } - //TODO: tuple field pub(super) fn record_field_to_def( &mut self, src: InFile, ) -> Option { self.to_def(src, keys::RECORD_FIELD) } + pub(super) fn tuple_field_to_def( + &mut self, + src: InFile, + ) -> Option { + self.to_def(src, keys::TUPLE_FIELD) + } pub(super) fn enum_variant_to_def( &mut self, src: InFile, -- cgit v1.2.3