Skip to content

Commit c90c88b

Browse files
committed
Always put a space after impl in macro pretty-printing
… regardless of whether the next symbol is punctuation or not.
1 parent 2e33bf2 commit c90c88b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/ide/src/expand_macro.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ struct Foo {}
319319
"#,
320320
expect![[r#"
321321
Clone
322-
impl< >core::clone::Clone for Foo< >{}
322+
impl < >core::clone::Clone for Foo< >{}
323323
324324
"#]],
325325
);
@@ -337,7 +337,7 @@ struct Foo {}
337337
"#,
338338
expect![[r#"
339339
Copy
340-
impl< >core::marker::Copy for Foo< >{}
340+
impl < >core::marker::Copy for Foo< >{}
341341
342342
"#]],
343343
);
@@ -354,9 +354,9 @@ struct Foo {}
354354
"#,
355355
expect![[r#"
356356
Copy, Clone
357-
impl< >core::marker::Copy for Foo< >{}
357+
impl < >core::marker::Copy for Foo< >{}
358358
359-
impl< >core::clone::Clone for Foo< >{}
359+
impl < >core::clone::Clone for Foo< >{}
360360
361361
"#]],
362362
);

crates/ide_db/src/helpers/insert_whitespace_into_node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub fn insert_ws_into(syn: SyntaxNode) -> SyntaxNode {
8888
LIFETIME_IDENT if is_next(|it| is_text(it), true) => {
8989
mods.push(do_ws(after, tok));
9090
}
91-
AS_KW | DYN_KW => {
91+
AS_KW | DYN_KW | IMPL_KW => {
9292
mods.push(do_ws(after, tok));
9393
}
9494
T![;] => {

0 commit comments

Comments
 (0)