From 178d8e96b5c810f40e7dd282ab06bb25d1fc8a2a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 11 Jun 2019 17:43:36 +0300 Subject: use Source for StructField --- crates/ra_ide_api/src/display/navigation_target.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_api/src/display') diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs index e5e1aa011..efba122b1 100644 --- a/crates/ra_ide_api/src/display/navigation_target.rs +++ b/crates/ra_ide_api/src/display/navigation_target.rs @@ -168,9 +168,9 @@ impl NavigationTarget { } pub(crate) fn from_field(db: &RootDatabase, field: hir::StructField) -> NavigationTarget { - let (file_id, field) = field.source(db); - let file_id = file_id.original_file(db); - match field { + let src = field.source(db); + let file_id = src.file_id.original_file(db); + match src.ast { FieldSource::Named(it) => { NavigationTarget::from_named(file_id, &*it, it.doc_comment_text(), it.short_label()) } -- cgit v1.2.3