diff options
Diffstat (limited to 'crates/ra_syntax/src/utils.rs')
-rw-r--r-- | crates/ra_syntax/src/utils.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/utils.rs b/crates/ra_syntax/src/utils.rs index 288d7edd4..5bbdf80bb 100644 --- a/crates/ra_syntax/src/utils.rs +++ b/crates/ra_syntax/src/utils.rs | |||
@@ -1,5 +1,6 @@ | |||
1 | use crate::{File, SyntaxKind, SyntaxNodeRef, WalkEvent}; | 1 | use crate::{SourceFileNode, SyntaxKind, SyntaxNodeRef, WalkEvent}; |
2 | use std::fmt::Write; | 2 | use std::fmt::Write; |
3 | use std::str; | ||
3 | 4 | ||
4 | /// Parse a file and create a string representation of the resulting parse tree. | 5 | /// Parse a file and create a string representation of the resulting parse tree. |
5 | pub fn dump_tree(syntax: SyntaxNodeRef) -> String { | 6 | pub fn dump_tree(syntax: SyntaxNodeRef) -> String { |
@@ -44,7 +45,7 @@ pub fn dump_tree(syntax: SyntaxNodeRef) -> String { | |||
44 | } | 45 | } |
45 | 46 | ||
46 | pub fn check_fuzz_invariants(text: &str) { | 47 | pub fn check_fuzz_invariants(text: &str) { |
47 | let file = File::parse(text); | 48 | let file = SourceFileNode::parse(text); |
48 | let root = file.syntax(); | 49 | let root = file.syntax(); |
49 | validate_block_structure(root); | 50 | validate_block_structure(root); |
50 | let _ = file.ast(); | 51 | let _ = file.ast(); |