diff options
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index caeb842b1..c0a3fec35 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs | |||
@@ -3,8 +3,7 @@ use ra_syntax::{ | |||
3 | AstNode, SyntaxNode, TextRange, SyntaxKind, SmolStr, SyntaxTreeBuilder, TreeArc, SyntaxElement, | 3 | AstNode, SyntaxNode, TextRange, SyntaxKind, SmolStr, SyntaxTreeBuilder, TreeArc, SyntaxElement, |
4 | ast, SyntaxKind::*, TextUnit, T | 4 | ast, SyntaxKind::*, TextUnit, T |
5 | }; | 5 | }; |
6 | use tt::buffer::Cursor; | 6 | use tt::buffer::{TokenBuffer, Cursor}; |
7 | |||
8 | use crate::subtree_source::{SubtreeTokenSource}; | 7 | use crate::subtree_source::{SubtreeTokenSource}; |
9 | use crate::ExpandError; | 8 | use crate::ExpandError; |
10 | 9 | ||
@@ -50,7 +49,7 @@ fn token_tree_to_syntax_node<F>(tt: &tt::Subtree, f: F) -> Result<TreeArc<Syntax | |||
50 | where | 49 | where |
51 | F: Fn(&mut ra_parser::TokenSource, &mut ra_parser::TreeSink), | 50 | F: Fn(&mut ra_parser::TokenSource, &mut ra_parser::TreeSink), |
52 | { | 51 | { |
53 | let buffer = tt::buffer::TokenBuffer::new(&[tt.clone().into()]); | 52 | let buffer = TokenBuffer::new(&[tt.clone().into()]); |
54 | let mut token_source = SubtreeTokenSource::new(&buffer); | 53 | let mut token_source = SubtreeTokenSource::new(&buffer); |
55 | let mut tree_sink = TtTreeSink::new(buffer.begin()); | 54 | let mut tree_sink = TtTreeSink::new(buffer.begin()); |
56 | f(&mut token_source, &mut tree_sink); | 55 | f(&mut token_source, &mut tree_sink); |