From 2d3940d0ab862dbfaed4f4c844faaca6a38e31e9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 11 Jan 2019 19:59:06 +0300 Subject: rename TreePtr -> TreeArc This is much clearer about the semantics --- crates/ra_hir/src/code_model_api.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'crates/ra_hir/src/code_model_api.rs') 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; use relative_path::RelativePathBuf; use ra_db::{CrateId, Cancelable, FileId}; -use ra_syntax::{ast, TreePtr, SyntaxNode, AstNode}; +use ra_syntax::{ast, TreeArc, SyntaxNode, AstNode}; use crate::{ Name, DefId, Path, PerNs, ScopesWithSyntaxMapping, Ty, HirFileId, @@ -55,8 +55,8 @@ pub struct Module { } pub enum ModuleSource { - SourceFile(TreePtr), - Module(TreePtr), + SourceFile(TreeArc), + Module(TreeArc), } #[derive(Clone, Debug, Hash, PartialEq, Eq)] @@ -86,7 +86,7 @@ impl Module { pub fn declaration_source( &self, db: &impl HirDatabase, - ) -> Cancelable)>> { + ) -> Cancelable)>> { self.declaration_source_impl(db) } @@ -134,7 +134,7 @@ impl Module { pub fn problems( &self, db: &impl HirDatabase, - ) -> Cancelable, Problem)>> { + ) -> Cancelable, Problem)>> { self.problems_impl(db) } } @@ -185,7 +185,7 @@ impl Struct { pub fn source( &self, db: &impl HirDatabase, - ) -> Cancelable<(HirFileId, TreePtr)> { + ) -> Cancelable<(HirFileId, TreeArc)> { let (file_id, syntax) = self.def_id.source(db); Ok(( file_id, @@ -218,7 +218,7 @@ impl Enum { Ok(db.enum_data(self.def_id)?.variants.clone()) } - pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreePtr)> { + pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreeArc)> { let (file_id, syntax) = self.def_id.source(db); Ok(( file_id, @@ -258,7 +258,7 @@ impl EnumVariant { pub fn source( &self, db: &impl HirDatabase, - ) -> Cancelable<(HirFileId, TreePtr)> { + ) -> Cancelable<(HirFileId, TreeArc)> { let (file_id, syntax) = self.def_id.source(db); Ok(( file_id, @@ -303,7 +303,7 @@ impl Function { self.def_id } - pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreePtr)> { + pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreeArc)> { Ok(self.source_impl(db)) } -- cgit v1.2.3