]> git.lizzy.rs Git - rust.git/commitdiff
minor rename
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 24 Jan 2019 10:40:36 +0000 (13:40 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 24 Jan 2019 10:40:36 +0000 (13:40 +0300)
crates/ra_syntax/src/ptr.rs

index b50cd8a520a14c7fbb204909135c591475200c9a..13ee1305f76d94d2a586ecd067c272b92f6a52f6 100644 (file)
@@ -42,7 +42,7 @@ pub fn kind(self) -> SyntaxKind {
 /// Like `SyntaxNodePtr`, but remembers the type of node
 #[derive(Debug, PartialEq, Eq, Hash)]
 pub struct AstPtr<N: AstNode> {
-    ptr: SyntaxNodePtr,
+    raw: SyntaxNodePtr,
     _ty: PhantomData<N>,
 }
 
@@ -56,18 +56,18 @@ fn clone(&self) -> AstPtr<N> {
 impl<N: AstNode> AstPtr<N> {
     pub fn new(node: &N) -> AstPtr<N> {
         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
     }
 }