aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe/src')
-rw-r--r--crates/ra_mbe/src/subtree_source.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/ra_mbe/src/subtree_source.rs
index 9d6d0133f..cf7458905 100644
--- a/crates/ra_mbe/src/subtree_source.rs
+++ b/crates/ra_mbe/src/subtree_source.rs
@@ -148,15 +148,7 @@ fn convert_ident(ident: &tt::Ident) -> TtToken {
148} 148}
149 149
150fn convert_punct(p: tt::Punct) -> TtToken { 150fn convert_punct(p: tt::Punct) -> TtToken {
151 let kind = match p.char { 151 let kind = SyntaxKind::from_char(p.char).unwrap();
152 // lexer may produce compound tokens for these ones
153 '.' => T![.],
154 ':' => T![:],
155 '=' => T![=],
156 '!' => T![!],
157 '-' => T![-],
158 c => SyntaxKind::from_char(c).unwrap(),
159 };
160 let text = { 152 let text = {
161 let mut buf = [0u8; 4]; 153 let mut buf = [0u8; 4];
162 let s: &str = p.char.encode_utf8(&mut buf); 154 let s: &str = p.char.encode_utf8(&mut buf);