Always put a space after impl in macro pretty-printing

… regardless of whether the next symbol is punctuation or not.
This commit is contained in:
Jonas Platte 2022-01-06 11:08:32 +01:00
parent 2e33bf23c9
commit c90c88b083
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
2 changed files with 5 additions and 5 deletions

View File

@ -319,7 +319,7 @@ struct Foo {}
"#,
expect![[r#"
Clone
impl< >core::clone::Clone for Foo< >{}
impl < >core::clone::Clone for Foo< >{}
"#]],
);
@ -337,7 +337,7 @@ struct Foo {}
"#,
expect![[r#"
Copy
impl< >core::marker::Copy for Foo< >{}
impl < >core::marker::Copy for Foo< >{}
"#]],
);
@ -354,9 +354,9 @@ struct Foo {}
"#,
expect![[r#"
Copy, Clone
impl< >core::marker::Copy for Foo< >{}
impl < >core::marker::Copy for Foo< >{}
impl< >core::clone::Clone for Foo< >{}
impl < >core::clone::Clone for Foo< >{}
"#]],
);

View 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 | DYN_KW => {
AS_KW | DYN_KW | IMPL_KW => {
mods.push(do_ws(after, tok));
}
T![;] => {