aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 20991659a..826a7d60b 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -3,7 +3,7 @@ use {SyntaxError, SyntaxNode, SyntaxNodeRef};
3 3
4/// Parse a file and create a string representation of the resulting parse tree. 4/// Parse a file and create a string representation of the resulting parse tree.
5pub fn dump_tree(syntax: &SyntaxNode) -> String { 5pub fn dump_tree(syntax: &SyntaxNode) -> String {
6 let syntax = syntax.borrow(); 6 let syntax = syntax.as_ref();
7 let mut errors: BTreeSet<_> = syntax.root.errors.iter().cloned().collect(); 7 let mut errors: BTreeSet<_> = syntax.root.errors.iter().cloned().collect();
8 let mut result = String::new(); 8 let mut result = String::new();
9 go(syntax, &mut result, 0, &mut errors); 9 go(syntax, &mut result, 0, &mut errors);