From 7f09083c6ff3cb3499b140ffe85f83a06f685aed Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 29 Feb 2020 18:35:45 +0100 Subject: [PATCH] Handle tuple fields as well --- crates/ra_hir/src/semantics.rs | 1 + crates/ra_hir/src/semantics/source_to_def.rs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 60392947e8d..74901e318a5 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs @@ -268,6 +268,7 @@ fn to_def(sema: &Semantics, src: InFile) -> Option 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,