11207: Always put a space after impl in macro pretty-printing r=Veykril a=jplatte

… regardless of whether the next symbol is punctuation or not.

Followup to #11200.

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
This commit is contained in:
bors[bot] 2022-01-06 10:48:54 +00:00 committed by GitHub
commit c1d3b7a91a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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![;] => {