Unnamed repository; edit this file 'description' to name the repository.
Merge #11207
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 <[email protected]>
bors[bot] 2022-01-06
parent 2e33bf2 · parent c90c88b · commit c1d3b7a
-rw-r--r--crates/ide/src/expand_macro.rs8
-rw-r--r--crates/ide_db/src/helpers/insert_whitespace_into_node.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide/src/expand_macro.rs b/crates/ide/src/expand_macro.rs
index 949744c01b..69d2454cf7 100644
--- a/crates/ide/src/expand_macro.rs
+++ b/crates/ide/src/expand_macro.rs
@@ -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< >{}
"#]],
);
diff --git a/crates/ide_db/src/helpers/insert_whitespace_into_node.rs b/crates/ide_db/src/helpers/insert_whitespace_into_node.rs
index 9d31966cea..d59f13b9a1 100644
--- a/crates/ide_db/src/helpers/insert_whitespace_into_node.rs
+++ b/crates/ide_db/src/helpers/insert_whitespace_into_node.rs
@@ -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![;] => {