From a00570d7a3645c5883da120720161561be169478 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 24 Jan 2019 13:40:36 +0300 Subject: minor rename --- crates/ra_syntax/src/ptr.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ra_syntax/src/ptr.rs b/crates/ra_syntax/src/ptr.rs index b50cd8a52..13ee1305f 100644 --- a/crates/ra_syntax/src/ptr.rs +++ b/crates/ra_syntax/src/ptr.rs @@ -42,7 +42,7 @@ impl SyntaxNodePtr { /// Like `SyntaxNodePtr`, but remembers the type of node #[derive(Debug, PartialEq, Eq, Hash)] pub struct AstPtr { - ptr: SyntaxNodePtr, + raw: SyntaxNodePtr, _ty: PhantomData, } @@ -56,18 +56,18 @@ impl Clone for AstPtr { impl AstPtr { pub fn new(node: &N) -> AstPtr { AstPtr { - ptr: SyntaxNodePtr::new(node.syntax()), + raw: SyntaxNodePtr::new(node.syntax()), _ty: PhantomData, } } pub fn to_node(self, source_file: &SourceFile) -> &N { - let syntax_node = self.ptr.to_node(source_file); + let syntax_node = self.raw.to_node(source_file); N::cast(syntax_node).unwrap() } pub fn syntax_node_ptr(self) -> SyntaxNodePtr { - self.ptr + self.raw } } -- cgit v1.2.3