aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/syntax_bridge.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-12 17:31:42 +0100
committerGitHub <[email protected]>2020-08-12 17:31:42 +0100
commitd583f2c46d22cf8d643ebf98be9cb7059a304431 (patch)
tree9d898eb9600b0c36a74e4f95238f679c683fa566 /crates/ra_mbe/src/syntax_bridge.rs
parent3d6889cba72a9d02199f7adaa2ecc69bc30af834 (diff)
parenta1c187eef3ba08076aedb5154929f7eda8d1b424 (diff)
Merge #5729
5729: Rename ra_syntax -> syntax r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_mbe/src/syntax_bridge.rs')
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs
index 7b9c88ae6..a8ad917fb 100644
--- a/crates/ra_mbe/src/syntax_bridge.rs
+++ b/crates/ra_mbe/src/syntax_bridge.rs
@@ -1,13 +1,13 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use parser::{FragmentKind, ParseError, TreeSink}; 3use parser::{FragmentKind, ParseError, TreeSink};
4use ra_syntax::{ 4use rustc_hash::FxHashMap;
5use syntax::{
5 ast::{self, make::tokens::doc_comment}, 6 ast::{self, make::tokens::doc_comment},
6 tokenize, AstToken, Parse, SmolStr, SyntaxKind, 7 tokenize, AstToken, Parse, SmolStr, SyntaxKind,
7 SyntaxKind::*, 8 SyntaxKind::*,
8 SyntaxNode, SyntaxToken, SyntaxTreeBuilder, TextRange, TextSize, Token as RawToken, T, 9 SyntaxNode, SyntaxToken, SyntaxTreeBuilder, TextRange, TextSize, Token as RawToken, T,
9}; 10};
10use rustc_hash::FxHashMap;
11use tt::buffer::{Cursor, TokenBuffer}; 11use tt::buffer::{Cursor, TokenBuffer};
12 12
13use crate::subtree_source::SubtreeTokenSource; 13use crate::subtree_source::SubtreeTokenSource;
@@ -176,7 +176,7 @@ fn doc_comment_text(comment: &ast::Comment) -> SmolStr {
176 text.into() 176 text.into()
177} 177}
178 178
179fn convert_doc_comment(token: &ra_syntax::SyntaxToken) -> Option<Vec<tt::TokenTree>> { 179fn convert_doc_comment(token: &syntax::SyntaxToken) -> Option<Vec<tt::TokenTree>> {
180 let comment = ast::Comment::cast(token.clone())?; 180 let comment = ast::Comment::cast(token.clone())?;
181 let doc = comment.kind().doc?; 181 let doc = comment.kind().doc?;
182 182
@@ -716,7 +716,7 @@ mod tests {
716 use super::*; 716 use super::*;
717 use crate::tests::parse_macro; 717 use crate::tests::parse_macro;
718 use parser::TokenSource; 718 use parser::TokenSource;
719 use ra_syntax::{ 719 use syntax::{
720 algo::{insert_children, InsertPosition}, 720 algo::{insert_children, InsertPosition},
721 ast::AstNode, 721 ast::AstNode,
722 }; 722 };