diff options
author | Aleksey Kladov <[email protected]> | 2019-07-12 17:41:13 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-12 17:41:13 +0100 |
commit | deab4caa7b1ba81c1b7e6561bc270bbde6467f13 (patch) | |
tree | af552549d828905294f4f3c109cdc339c12020ad /crates/ra_ide_api/src/references.rs | |
parent | 2e466bb365813620de15afd5e04736a92fffdca9 (diff) |
make Parse fields private
this is in preparation for the new rowan API
Diffstat (limited to 'crates/ra_ide_api/src/references.rs')
-rw-r--r-- | crates/ra_ide_api/src/references.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs index 766c0ad74..0af1ae811 100644 --- a/crates/ra_ide_api/src/references.rs +++ b/crates/ra_ide_api/src/references.rs | |||
@@ -49,8 +49,8 @@ pub(crate) fn find_all_refs( | |||
49 | db: &RootDatabase, | 49 | db: &RootDatabase, |
50 | position: FilePosition, | 50 | position: FilePosition, |
51 | ) -> Option<ReferenceSearchResult> { | 51 | ) -> Option<ReferenceSearchResult> { |
52 | let file = db.parse(position.file_id).tree; | 52 | let parse = db.parse(position.file_id); |
53 | let (binding, analyzer) = find_binding(db, &file, position)?; | 53 | let (binding, analyzer) = find_binding(db, parse.tree(), position)?; |
54 | let declaration = NavigationTarget::from_bind_pat(position.file_id, binding); | 54 | let declaration = NavigationTarget::from_bind_pat(position.file_id, binding); |
55 | 55 | ||
56 | let references = analyzer | 56 | let references = analyzer |
@@ -88,8 +88,8 @@ pub(crate) fn rename( | |||
88 | position: FilePosition, | 88 | position: FilePosition, |
89 | new_name: &str, | 89 | new_name: &str, |
90 | ) -> Option<SourceChange> { | 90 | ) -> Option<SourceChange> { |
91 | let source_file = db.parse(position.file_id).tree; | 91 | let parse = db.parse(position.file_id); |
92 | let syntax = source_file.syntax(); | 92 | let syntax = parse.tree().syntax(); |
93 | 93 | ||
94 | if let Some((ast_name, ast_module)) = find_name_and_module_at_offset(syntax, position) { | 94 | if let Some((ast_name, ast_module)) = find_name_and_module_at_offset(syntax, position) { |
95 | rename_mod(db, ast_name, ast_module, position, new_name) | 95 | rename_mod(db, ast_name, ast_module, position, new_name) |