diff options
| author | bors <bors@rust-lang.org> | 2022-05-15 12:47:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-15 12:47:38 +0000 |
| commit | 5ae9847dea89a8c506077948e2631d9588706c13 (patch) | |
| tree | 5a983936a11ff5a9aa62277d91b67254a605c407 | |
| parent | fa133d065b8f46b16bd69c7a83c6edb44c54ad9a (diff) | |
| parent | 4efc2a9df21f796b71588d0ae8b14ca29f4a1919 (diff) | |
| download | rust-5ae9847dea89a8c506077948e2631d9588706c13.tar.gz rust-5ae9847dea89a8c506077948e2631d9588706c13.zip | |
Auto merge of #12262 - jhgg:fix-whitespace-between-mut-self-in-macro-expansion, r=lnicola
ide: insert whitespace between 'mut' and 'self' in macro expansion fixes #12260
| -rw-r--r-- | crates/ide-db/src/syntax_helpers/insert_whitespace_into_node.rs | 3 |
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 e389eaf0478..16e609b1a7e 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)); } |
