From 35bec31bca7356d6ae4ef9bfc4f813ebeeb4c971 Mon Sep 17 00:00:00 2001 From: Emmanuel Thompson Date: Tue, 6 Apr 2021 23:22:44 -0400 Subject: Add space after lifetime In macro expansion, this lead to invalid syntax --- crates/ide/src/expand_macro.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ide') diff --git a/crates/ide/src/expand_macro.rs b/crates/ide/src/expand_macro.rs index 9eeabbeda..d5628e3df 100644 --- a/crates/ide/src/expand_macro.rs +++ b/crates/ide/src/expand_macro.rs @@ -103,6 +103,9 @@ fn insert_whitespaces(syn: SyntaxNode) -> String { format!("\n{}}}", " ".repeat(indent)) } R_CURLY => format!("}}\n{}", " ".repeat(indent)), + LIFETIME_IDENT if is_next(|it| it == IDENT, true) => { + format!("{} ", token.text().to_string()) + } T![;] => format!(";\n{}", " ".repeat(indent)), T![->] => " -> ".to_string(), T![=] => " = ".to_string(), -- cgit v1.2.3