diff options
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r-- | crates/ra_mbe/src/tt_cursor.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tt_cursor.rs b/crates/ra_mbe/src/tt_cursor.rs index 818c412a0..741b5ea1c 100644 --- a/crates/ra_mbe/src/tt_cursor.rs +++ b/crates/ra_mbe/src/tt_cursor.rs | |||
@@ -134,6 +134,13 @@ impl<'a> TtCursor<'a> { | |||
134 | } | 134 | } |
135 | 135 | ||
136 | pub(crate) fn eat_lifetime(&mut self) -> Option<tt::TokenTree> { | 136 | pub(crate) fn eat_lifetime(&mut self) -> Option<tt::TokenTree> { |
137 | // check if it start from "`" | ||
138 | if let Some(ident) = self.at_ident() { | ||
139 | if ident.text.chars().next()? != '\'' { | ||
140 | return None; | ||
141 | } | ||
142 | } | ||
143 | |||
137 | self.eat_ident().cloned().map(|ident| tt::Leaf::from(ident).into()) | 144 | self.eat_ident().cloned().map(|ident| tt::Leaf::from(ident).into()) |
138 | } | 145 | } |
139 | 146 | ||