diff options
Diffstat (limited to 'src/utils.rs')
-rw-r--r-- | src/utils.rs | 2 |
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. |
5 | pub fn dump_tree(syntax: &SyntaxNode) -> String { | 5 | pub 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); |