diff options
author | Aleksey Kladov <[email protected]> | 2019-01-11 16:59:06 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-11 16:59:06 +0000 |
commit | 2d3940d0ab862dbfaed4f4c844faaca6a38e31e9 (patch) | |
tree | 0d8412f73a0fa6f9c1e6913e6133d3daf25dcb91 /crates/ra_hir/src/code_model_impl | |
parent | aad1bf877e4ba5ce9e28e8bde14f790ef8d1551b (diff) |
rename TreePtr -> TreeArc
This is much clearer about the semantics
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/code_model_impl/module.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs index 009175bab..daf49e791 100644 --- a/crates/ra_hir/src/code_model_impl/function.rs +++ b/crates/ra_hir/src/code_model_impl/function.rs | |||
@@ -4,7 +4,7 @@ use std::sync::Arc; | |||
4 | 4 | ||
5 | use ra_db::Cancelable; | 5 | use ra_db::Cancelable; |
6 | use ra_syntax::{ | 6 | use ra_syntax::{ |
7 | TreePtr, | 7 | TreeArc, |
8 | ast::{self, AstNode, NameOwner}, | 8 | ast::{self, AstNode, NameOwner}, |
9 | }; | 9 | }; |
10 | 10 | ||
@@ -22,7 +22,7 @@ impl Function { | |||
22 | Function { def_id } | 22 | Function { def_id } |
23 | } | 23 | } |
24 | 24 | ||
25 | pub(crate) fn source_impl(&self, db: &impl HirDatabase) -> (HirFileId, TreePtr<ast::FnDef>) { | 25 | pub(crate) fn source_impl(&self, db: &impl HirDatabase) -> (HirFileId, TreeArc<ast::FnDef>) { |
26 | let def_loc = self.def_id.loc(db); | 26 | let def_loc = self.def_id.loc(db); |
27 | assert!(def_loc.kind == DefKind::Function); | 27 | assert!(def_loc.kind == DefKind::Function); |
28 | let syntax = db.file_item(def_loc.source_item_id); | 28 | let syntax = db.file_item(def_loc.source_item_id); |
diff --git a/crates/ra_hir/src/code_model_impl/module.rs b/crates/ra_hir/src/code_model_impl/module.rs index 878dc37c8..e9ff06dc8 100644 --- a/crates/ra_hir/src/code_model_impl/module.rs +++ b/crates/ra_hir/src/code_model_impl/module.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | use ra_db::{Cancelable, SourceRootId, FileId}; | 1 | use ra_db::{Cancelable, SourceRootId, FileId}; |
2 | use ra_syntax::{ast, SyntaxNode, AstNode, TreePtr}; | 2 | use ra_syntax::{ast, SyntaxNode, AstNode, TreeArc}; |
3 | 3 | ||
4 | use crate::{ | 4 | use crate::{ |
5 | Module, ModuleSource, Problem, | 5 | Module, ModuleSource, Problem, |
@@ -57,7 +57,7 @@ impl Module { | |||
57 | pub fn declaration_source_impl( | 57 | pub fn declaration_source_impl( |
58 | &self, | 58 | &self, |
59 | db: &impl HirDatabase, | 59 | db: &impl HirDatabase, |
60 | ) -> Cancelable<Option<(FileId, TreePtr<ast::Module>)>> { | 60 | ) -> Cancelable<Option<(FileId, TreeArc<ast::Module>)>> { |
61 | let loc = self.def_id.loc(db); | 61 | let loc = self.def_id.loc(db); |
62 | let module_tree = db.module_tree(loc.source_root_id)?; | 62 | let module_tree = db.module_tree(loc.source_root_id)?; |
63 | let link = ctry!(loc.module_id.parent_link(&module_tree)); | 63 | let link = ctry!(loc.module_id.parent_link(&module_tree)); |
@@ -173,7 +173,7 @@ impl Module { | |||
173 | pub fn problems_impl( | 173 | pub fn problems_impl( |
174 | &self, | 174 | &self, |
175 | db: &impl HirDatabase, | 175 | db: &impl HirDatabase, |
176 | ) -> Cancelable<Vec<(TreePtr<SyntaxNode>, Problem)>> { | 176 | ) -> Cancelable<Vec<(TreeArc<SyntaxNode>, Problem)>> { |
177 | let loc = self.def_id.loc(db); | 177 | let loc = self.def_id.loc(db); |
178 | let module_tree = db.module_tree(loc.source_root_id)?; | 178 | let module_tree = db.module_tree(loc.source_root_id)?; |
179 | Ok(loc.module_id.problems(&module_tree, db)) | 179 | Ok(loc.module_id.problems(&module_tree, db)) |