diff options
Diffstat (limited to 'crates/ra_hir/src/code_model_api.rs')
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 8ec6b9b2b..098c7f40b 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -2,7 +2,7 @@ use std::sync::Arc; | |||
2 | 2 | ||
3 | use relative_path::RelativePathBuf; | 3 | use relative_path::RelativePathBuf; |
4 | use ra_db::{CrateId, Cancelable, FileId}; | 4 | use ra_db::{CrateId, Cancelable, FileId}; |
5 | use ra_syntax::{ast, TreePtr, SyntaxNode, AstNode}; | 5 | use ra_syntax::{ast, TreeArc, SyntaxNode, AstNode}; |
6 | 6 | ||
7 | use crate::{ | 7 | use crate::{ |
8 | Name, DefId, Path, PerNs, ScopesWithSyntaxMapping, Ty, HirFileId, | 8 | Name, DefId, Path, PerNs, ScopesWithSyntaxMapping, Ty, HirFileId, |
@@ -55,8 +55,8 @@ pub struct Module { | |||
55 | } | 55 | } |
56 | 56 | ||
57 | pub enum ModuleSource { | 57 | pub enum ModuleSource { |
58 | SourceFile(TreePtr<ast::SourceFile>), | 58 | SourceFile(TreeArc<ast::SourceFile>), |
59 | Module(TreePtr<ast::Module>), | 59 | Module(TreeArc<ast::Module>), |
60 | } | 60 | } |
61 | 61 | ||
62 | #[derive(Clone, Debug, Hash, PartialEq, Eq)] | 62 | #[derive(Clone, Debug, Hash, PartialEq, Eq)] |
@@ -86,7 +86,7 @@ impl Module { | |||
86 | pub fn declaration_source( | 86 | pub fn declaration_source( |
87 | &self, | 87 | &self, |
88 | db: &impl HirDatabase, | 88 | db: &impl HirDatabase, |
89 | ) -> Cancelable<Option<(FileId, TreePtr<ast::Module>)>> { | 89 | ) -> Cancelable<Option<(FileId, TreeArc<ast::Module>)>> { |
90 | self.declaration_source_impl(db) | 90 | self.declaration_source_impl(db) |
91 | } | 91 | } |
92 | 92 | ||
@@ -134,7 +134,7 @@ impl Module { | |||
134 | pub fn problems( | 134 | pub fn problems( |
135 | &self, | 135 | &self, |
136 | db: &impl HirDatabase, | 136 | db: &impl HirDatabase, |
137 | ) -> Cancelable<Vec<(TreePtr<SyntaxNode>, Problem)>> { | 137 | ) -> Cancelable<Vec<(TreeArc<SyntaxNode>, Problem)>> { |
138 | self.problems_impl(db) | 138 | self.problems_impl(db) |
139 | } | 139 | } |
140 | } | 140 | } |
@@ -185,7 +185,7 @@ impl Struct { | |||
185 | pub fn source( | 185 | pub fn source( |
186 | &self, | 186 | &self, |
187 | db: &impl HirDatabase, | 187 | db: &impl HirDatabase, |
188 | ) -> Cancelable<(HirFileId, TreePtr<ast::StructDef>)> { | 188 | ) -> Cancelable<(HirFileId, TreeArc<ast::StructDef>)> { |
189 | let (file_id, syntax) = self.def_id.source(db); | 189 | let (file_id, syntax) = self.def_id.source(db); |
190 | Ok(( | 190 | Ok(( |
191 | file_id, | 191 | file_id, |
@@ -218,7 +218,7 @@ impl Enum { | |||
218 | Ok(db.enum_data(self.def_id)?.variants.clone()) | 218 | Ok(db.enum_data(self.def_id)?.variants.clone()) |
219 | } | 219 | } |
220 | 220 | ||
221 | pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreePtr<ast::EnumDef>)> { | 221 | pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreeArc<ast::EnumDef>)> { |
222 | let (file_id, syntax) = self.def_id.source(db); | 222 | let (file_id, syntax) = self.def_id.source(db); |
223 | Ok(( | 223 | Ok(( |
224 | file_id, | 224 | file_id, |
@@ -258,7 +258,7 @@ impl EnumVariant { | |||
258 | pub fn source( | 258 | pub fn source( |
259 | &self, | 259 | &self, |
260 | db: &impl HirDatabase, | 260 | db: &impl HirDatabase, |
261 | ) -> Cancelable<(HirFileId, TreePtr<ast::EnumVariant>)> { | 261 | ) -> Cancelable<(HirFileId, TreeArc<ast::EnumVariant>)> { |
262 | let (file_id, syntax) = self.def_id.source(db); | 262 | let (file_id, syntax) = self.def_id.source(db); |
263 | Ok(( | 263 | Ok(( |
264 | file_id, | 264 | file_id, |
@@ -303,7 +303,7 @@ impl Function { | |||
303 | self.def_id | 303 | self.def_id |
304 | } | 304 | } |
305 | 305 | ||
306 | pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreePtr<ast::FnDef>)> { | 306 | pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreeArc<ast::FnDef>)> { |
307 | Ok(self.source_impl(db)) | 307 | Ok(self.source_impl(db)) |
308 | } | 308 | } |
309 | 309 | ||