aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/goto_definition.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/goto_definition.rs')
-rw-r--r--crates/ra_ide/src/goto_definition.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs
index c10a6c844..76a741207 100644
--- a/crates/ra_ide/src/goto_definition.rs
+++ b/crates/ra_ide/src/goto_definition.rs
@@ -1,6 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use hir::{db::AstDatabase, Source}; 3use hir::{db::AstDatabase, InFile};
4use ra_syntax::{ 4use ra_syntax::{
5 ast::{self, DocCommentsOwner}, 5 ast::{self, DocCommentsOwner},
6 match_ast, AstNode, SyntaxNode, 6 match_ast, AstNode, SyntaxNode,
@@ -58,7 +58,7 @@ impl ReferenceResult {
58 58
59pub(crate) fn reference_definition( 59pub(crate) fn reference_definition(
60 db: &RootDatabase, 60 db: &RootDatabase,
61 name_ref: Source<&ast::NameRef>, 61 name_ref: InFile<&ast::NameRef>,
62) -> ReferenceResult { 62) -> ReferenceResult {
63 use self::ReferenceResult::*; 63 use self::ReferenceResult::*;
64 64
@@ -94,7 +94,7 @@ pub(crate) fn reference_definition(
94 94
95pub(crate) fn name_definition( 95pub(crate) fn name_definition(
96 db: &RootDatabase, 96 db: &RootDatabase,
97 name: Source<&ast::Name>, 97 name: InFile<&ast::Name>,
98) -> Option<Vec<NavigationTarget>> { 98) -> Option<Vec<NavigationTarget>> {
99 let parent = name.value.syntax().parent()?; 99 let parent = name.value.syntax().parent()?;
100 100
@@ -115,7 +115,7 @@ pub(crate) fn name_definition(
115 None 115 None
116} 116}
117 117
118fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<NavigationTarget> { 118fn named_target(db: &RootDatabase, node: InFile<&SyntaxNode>) -> Option<NavigationTarget> {
119 match_ast! { 119 match_ast! {
120 match (node.value) { 120 match (node.value) {
121 ast::StructDef(it) => { 121 ast::StructDef(it) => {