]> git.lizzy.rs Git - rust.git/commitdiff
Always put a space after `dyn` in macro pretty-printing
authorJonas Platte <jplatte+git@posteo.de>
Wed, 5 Jan 2022 17:04:44 +0000 (18:04 +0100)
committerJonas Platte <jplatte+git@posteo.de>
Wed, 5 Jan 2022 17:06:50 +0000 (18:06 +0100)
… regardless of whether the next symbol is punctuation or not.
Fixes issue 11100.

crates/ide_db/src/helpers/insert_whitespace_into_node.rs

index 251a4caa13278636788c7447599d68f4521ce4a3..9d31966cea67a4926453fc7d55cbdcb8e6f61759 100644 (file)
@@ -88,7 +88,7 @@ pub fn insert_ws_into(syn: SyntaxNode) -> SyntaxNode {
             LIFETIME_IDENT if is_next(|it| is_text(it), true) => {
                 mods.push(do_ws(after, tok));
             }
-            AS_KW => {
+            AS_KW | DYN_KW => {
                 mods.push(do_ws(after, tok));
             }
             T![;] => {