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_impl/function.rs | 4 ++-- crates/ra_hir/src/code_model_impl/module.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_hir/src/code_model_impl') 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; use ra_db::Cancelable; use ra_syntax::{ - TreePtr, + TreeArc, ast::{self, AstNode, NameOwner}, }; @@ -22,7 +22,7 @@ impl Function { Function { def_id } } - pub(crate) fn source_impl(&self, db: &impl HirDatabase) -> (HirFileId, TreePtr) { + pub(crate) fn source_impl(&self, db: &impl HirDatabase) -> (HirFileId, TreeArc) { let def_loc = self.def_id.loc(db); assert!(def_loc.kind == DefKind::Function); 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 @@ use ra_db::{Cancelable, SourceRootId, FileId}; -use ra_syntax::{ast, SyntaxNode, AstNode, TreePtr}; +use ra_syntax::{ast, SyntaxNode, AstNode, TreeArc}; use crate::{ Module, ModuleSource, Problem, @@ -57,7 +57,7 @@ impl Module { pub fn declaration_source_impl( &self, db: &impl HirDatabase, - ) -> Cancelable)>> { + ) -> Cancelable)>> { let loc = self.def_id.loc(db); let module_tree = db.module_tree(loc.source_root_id)?; let link = ctry!(loc.module_id.parent_link(&module_tree)); @@ -173,7 +173,7 @@ impl Module { pub fn problems_impl( &self, db: &impl HirDatabase, - ) -> Cancelable, Problem)>> { + ) -> Cancelable, Problem)>> { let loc = self.def_id.loc(db); let module_tree = db.module_tree(loc.source_root_id)?; Ok(loc.module_id.problems(&module_tree, db)) -- cgit v1.2.3