diff options
author | Aleksey Kladov <[email protected]> | 2019-11-20 06:40:36 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-20 06:42:30 +0000 |
commit | 36e3fc9d5413f7e6e17e82867aae1318645880a3 (patch) | |
tree | 166ee3c45f99611f7c20740c2a246f5b3bed41a3 /crates/ra_ide_api/src/goto_definition.rs | |
parent | e975f6364cb3caf50467835afb0dafce887f51f0 (diff) |
Rename Source::ast -> Source::value
Diffstat (limited to 'crates/ra_ide_api/src/goto_definition.rs')
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 3f16e9566..ed9d99a7f 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -23,7 +23,7 @@ pub(crate) fn goto_definition( | |||
23 | let token = descend_into_macros(db, position.file_id, token); | 23 | let token = descend_into_macros(db, position.file_id, token); |
24 | 24 | ||
25 | let res = match_ast! { | 25 | let res = match_ast! { |
26 | match (token.ast.parent()) { | 26 | match (token.value.parent()) { |
27 | ast::NameRef(name_ref) => { | 27 | ast::NameRef(name_ref) => { |
28 | let navs = reference_definition(db, token.with_ast(&name_ref)).to_vec(); | 28 | let navs = reference_definition(db, token.with_ast(&name_ref)).to_vec(); |
29 | RangeInfo::new(name_ref.syntax().text_range(), navs.to_vec()) | 29 | RangeInfo::new(name_ref.syntax().text_range(), navs.to_vec()) |
@@ -84,7 +84,7 @@ pub(crate) fn reference_definition( | |||
84 | }; | 84 | }; |
85 | 85 | ||
86 | // Fallback index based approach: | 86 | // Fallback index based approach: |
87 | let navs = crate::symbol_index::index_resolve(db, name_ref.ast) | 87 | let navs = crate::symbol_index::index_resolve(db, name_ref.value) |
88 | .into_iter() | 88 | .into_iter() |
89 | .map(|s| s.to_nav(db)) | 89 | .map(|s| s.to_nav(db)) |
90 | .collect(); | 90 | .collect(); |
@@ -95,7 +95,7 @@ pub(crate) fn name_definition( | |||
95 | db: &RootDatabase, | 95 | db: &RootDatabase, |
96 | name: Source<&ast::Name>, | 96 | name: Source<&ast::Name>, |
97 | ) -> Option<Vec<NavigationTarget>> { | 97 | ) -> Option<Vec<NavigationTarget>> { |
98 | let parent = name.ast.syntax().parent()?; | 98 | let parent = name.value.syntax().parent()?; |
99 | 99 | ||
100 | if let Some(module) = ast::Module::cast(parent.clone()) { | 100 | if let Some(module) = ast::Module::cast(parent.clone()) { |
101 | if module.has_semi() { | 101 | if module.has_semi() { |
@@ -116,7 +116,7 @@ pub(crate) fn name_definition( | |||
116 | 116 | ||
117 | fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<NavigationTarget> { | 117 | fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<NavigationTarget> { |
118 | match_ast! { | 118 | match_ast! { |
119 | match (node.ast) { | 119 | match (node.value) { |
120 | ast::StructDef(it) => { | 120 | ast::StructDef(it) => { |
121 | Some(NavigationTarget::from_named( | 121 | Some(NavigationTarget::from_named( |
122 | db, | 122 | db, |