aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs5
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};
6use tt::buffer::Cursor; 6use tt::buffer::{TokenBuffer, Cursor};
7
8use crate::subtree_source::{SubtreeTokenSource}; 7use crate::subtree_source::{SubtreeTokenSource};
9use crate::ExpandError; 8use crate::ExpandError;
10 9
@@ -50,7 +49,7 @@ fn token_tree_to_syntax_node<F>(tt: &tt::Subtree, f: F) -> Result<TreeArc<Syntax
50where 49where
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);