Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax-bridge/src/to_parser_input.rs')
-rw-r--r--crates/syntax-bridge/src/to_parser_input.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/syntax-bridge/src/to_parser_input.rs b/crates/syntax-bridge/src/to_parser_input.rs
index 021dc6595f..c0ff8e1db2 100644
--- a/crates/syntax-bridge/src/to_parser_input.rs
+++ b/crates/syntax-bridge/src/to_parser_input.rs
@@ -21,17 +21,17 @@ pub fn to_parser_input<Ctx: Copy + fmt::Debug + PartialEq + Eq + Hash>(
let tt = current.token_tree();
// Check if it is lifetime
- if let Some(tt::TokenTree::Leaf(tt::Leaf::Punct(punct))) = tt {
- if punct.char == '\'' {
- current.bump();
- match current.token_tree() {
- Some(tt::TokenTree::Leaf(tt::Leaf::Ident(_ident))) => {
- res.push(LIFETIME_IDENT);
- current.bump();
- continue;
- }
- _ => panic!("Next token must be ident"),
+ if let Some(tt::TokenTree::Leaf(tt::Leaf::Punct(punct))) = tt
+ && punct.char == '\''
+ {
+ current.bump();
+ match current.token_tree() {
+ Some(tt::TokenTree::Leaf(tt::Leaf::Ident(_ident))) => {
+ res.push(LIFETIME_IDENT);
+ current.bump();
+ continue;
}
+ _ => panic!("Next token must be ident"),
}
}