Unnamed repository; edit this file 'description' to name the repository.
ide: insert whitespace between 'mut' and 'self' in macro expansion
Jake Heinz 2022-05-15
parent 1ff5b2c · commit 4efc2a9
-rw-r--r--crates/ide-db/src/syntax_helpers/insert_whitespace_into_node.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ide-db/src/syntax_helpers/insert_whitespace_into_node.rs b/crates/ide-db/src/syntax_helpers/insert_whitespace_into_node.rs
index e389eaf047..16e609b1a7 100644
--- a/crates/ide-db/src/syntax_helpers/insert_whitespace_into_node.rs
+++ b/crates/ide-db/src/syntax_helpers/insert_whitespace_into_node.rs
@@ -88,6 +88,9 @@ pub fn insert_ws_into(syn: SyntaxNode) -> SyntaxNode {
LIFETIME_IDENT if is_next(is_text, true) => {
mods.push(do_ws(after, tok));
}
+ MUT_KW if is_next(|it| it == SELF_KW, false) => {
+ mods.push(do_ws(after, tok));
+ }
AS_KW | DYN_KW | IMPL_KW | CONST_KW => {
mods.push(do_ws(after, tok));
}