aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r--crates/ra_mbe/src/subtree_source.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/ra_mbe/src/subtree_source.rs
index 16a053b49..6d4d8fa13 100644
--- a/crates/ra_mbe/src/subtree_source.rs
+++ b/crates/ra_mbe/src/subtree_source.rs
@@ -429,7 +429,12 @@ fn convert_literal(l: &tt::Literal) -> TtToken {
429} 429}
430 430
431fn convert_ident(ident: &tt::Ident) -> TtToken { 431fn convert_ident(ident: &tt::Ident) -> TtToken {
432 let kind = SyntaxKind::from_keyword(ident.text.as_str()).unwrap_or(IDENT); 432 let kind = if let Some('\'') = ident.text.chars().next() {
433 LIFETIME
434 } else {
435 SyntaxKind::from_keyword(ident.text.as_str()).unwrap_or(IDENT)
436 };
437
433 TtToken { kind, is_joint_to_next: false, text: ident.text.clone(), n_tokens: 1 } 438 TtToken { kind, is_joint_to_next: false, text: ident.text.clone(), n_tokens: 1 }
434} 439}
435 440