aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/macros.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-11 16:59:06 +0000
committerAleksey Kladov <[email protected]>2019-01-11 16:59:06 +0000
commit2d3940d0ab862dbfaed4f4c844faaca6a38e31e9 (patch)
tree0d8412f73a0fa6f9c1e6913e6133d3daf25dcb91 /crates/ra_hir/src/macros.rs
parentaad1bf877e4ba5ce9e28e8bde14f790ef8d1551b (diff)
rename TreePtr -> TreeArc
This is much clearer about the semantics
Diffstat (limited to 'crates/ra_hir/src/macros.rs')
-rw-r--r--crates/ra_hir/src/macros.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/macros.rs b/crates/ra_hir/src/macros.rs
index e455b2ad5..220bee94e 100644
--- a/crates/ra_hir/src/macros.rs
+++ b/crates/ra_hir/src/macros.rs
@@ -11,7 +11,7 @@ use std::sync::Arc;
11 11
12use ra_db::LocalSyntaxPtr; 12use ra_db::LocalSyntaxPtr;
13use ra_syntax::{ 13use ra_syntax::{
14 TextRange, TextUnit, SourceFile, AstNode, SyntaxNode, TreePtr, 14 TextRange, TextUnit, SourceFile, AstNode, SyntaxNode, TreeArc,
15 ast::{self, NameOwner}, 15 ast::{self, NameOwner},
16}; 16};
17 17
@@ -152,11 +152,11 @@ pub struct MacroExpansion {
152impl MacroExpansion { 152impl MacroExpansion {
153 // FIXME: does not really make sense, macro expansion is not neccessary a 153 // FIXME: does not really make sense, macro expansion is not neccessary a
154 // whole file. See `MacroExpansion::ptr` as well. 154 // whole file. See `MacroExpansion::ptr` as well.
155 pub(crate) fn file(&self) -> TreePtr<SourceFile> { 155 pub(crate) fn file(&self) -> TreeArc<SourceFile> {
156 SourceFile::parse(&self.text) 156 SourceFile::parse(&self.text)
157 } 157 }
158 158
159 pub fn syntax(&self) -> TreePtr<SyntaxNode> { 159 pub fn syntax(&self) -> TreeArc<SyntaxNode> {
160 self.ptr.resolve(&self.file()) 160 self.ptr.resolve(&self.file())
161 } 161 }
162 /// Maps range in the source code to the range in the expanded code. 162 /// Maps range in the source code to the range in the expanded code.