diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 08:55:38 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 08:55:38 +0000 |
commit | 8b6dea348fa02a7ce8107a1e73917f0597f2a91d (patch) | |
tree | 36b2bc1e21eccda2c624e3dd70ddd7052b9f9907 /crates/ra_ide_api/src/goto_definition.rs | |
parent | c869ee219a80af1993496e00490dc107202ff55c (diff) | |
parent | 9457b1f0e64d38e7dc24d8c66a52ffef759d4dbf (diff) |
Merge #666
666: rename source_file -> parse r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/goto_definition.rs')
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 180cc7c80..2a20c20ee 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -11,7 +11,7 @@ pub(crate) fn goto_definition( | |||
11 | db: &RootDatabase, | 11 | db: &RootDatabase, |
12 | position: FilePosition, | 12 | position: FilePosition, |
13 | ) -> Option<RangeInfo<Vec<NavigationTarget>>> { | 13 | ) -> Option<RangeInfo<Vec<NavigationTarget>>> { |
14 | let file = db.source_file(position.file_id); | 14 | let file = db.parse(position.file_id); |
15 | let syntax = file.syntax(); | 15 | let syntax = file.syntax(); |
16 | if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, position.offset) { | 16 | if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, position.offset) { |
17 | let navs = reference_definition(db, position.file_id, name_ref).to_vec(); | 17 | let navs = reference_definition(db, position.file_id, name_ref).to_vec(); |