mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
rename TreePtr -> TreeArc
This is much clearer about the semantics
This commit is contained in:
parent
aad1bf877e
commit
2d3940d0ab
25 changed files with 197 additions and 197 deletions
|
@ -15,7 +15,7 @@ use rowan::TransparentNewType;
|
|||
|
||||
use crate::{
|
||||
SyntaxNode, SyntaxKind::*,
|
||||
yellow::{RaTypes, TreePtr},
|
||||
yellow::{RaTypes, TreeArc},
|
||||
ast::{self, AstNode},
|
||||
};
|
||||
{% for node, methods in ast %}
|
||||
|
@ -48,7 +48,7 @@ impl AstNode for {{ node }} {
|
|||
}
|
||||
}
|
||||
fn syntax(&self) -> &SyntaxNode { &self.syntax }
|
||||
fn to_owned(&self) -> TreePtr<{{ node }}> { TreePtr::cast(self.syntax.to_owned()) }
|
||||
fn to_owned(&self) -> TreeArc<{{ node }}> { TreeArc::cast(self.syntax.to_owned()) }
|
||||
}
|
||||
|
||||
impl {{ node }} {
|
||||
|
@ -79,7 +79,7 @@ impl AstNode for {{ node }} {
|
|||
}
|
||||
}
|
||||
fn syntax(&self) -> &SyntaxNode { &self.syntax }
|
||||
fn to_owned(&self) -> TreePtr<{{ node }}> { TreePtr::cast(self.syntax.to_owned()) }
|
||||
fn to_owned(&self) -> TreeArc<{{ node }}> { TreeArc::cast(self.syntax.to_owned()) }
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue