From f8b36bbc3b968754b71844d942286e81415627b8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 7 Nov 2018 18:32:33 +0300 Subject: Rename File -> SourceFileNode --- crates/ra_analysis/src/syntax_ptr.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_analysis/src/syntax_ptr.rs') diff --git a/crates/ra_analysis/src/syntax_ptr.rs b/crates/ra_analysis/src/syntax_ptr.rs index 4afb1fc93..e45934ce0 100644 --- a/crates/ra_analysis/src/syntax_ptr.rs +++ b/crates/ra_analysis/src/syntax_ptr.rs @@ -1,4 +1,4 @@ -use ra_syntax::{File, SyntaxKind, SyntaxNode, SyntaxNodeRef, TextRange}; +use ra_syntax::{SourceFileNode, SyntaxKind, SyntaxNode, SyntaxNodeRef, TextRange}; use crate::db::SyntaxDatabase; use crate::FileId; @@ -43,7 +43,7 @@ impl LocalSyntaxPtr { } } - pub(crate) fn resolve(self, file: &File) -> SyntaxNode { + pub(crate) fn resolve(self, file: &SourceFileNode) -> SyntaxNode { let mut curr = file.syntax(); loop { if curr.range() == self.range && curr.kind() == self.kind { @@ -67,7 +67,7 @@ impl LocalSyntaxPtr { #[test] fn test_local_syntax_ptr() { use ra_syntax::{ast, AstNode}; - let file = File::parse("struct Foo { f: u32, }"); + let file = SourceFileNode::parse("struct Foo { f: u32, }"); let field = file .syntax() .descendants() -- cgit v1.2.3