Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #12071 - Ma124:fix-tabs-snippet, r=jonas-schievink
Change tabs to spacs in macro_rules snippet This PR changes the `macro_rules!` snippet to use spaces instead of tabs. The other snippets like [this one][test-snippet] already use spaces. The snippet was introduced in 5575588 where no reason is provided to use tabs. [test-snippet]: https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide_completion/src/completions/snippet.rs#L70=
bors 2022-04-25
parent b24b82f · parent b06c95a · commit 1d2bd0e
-rw-r--r--crates/ide_completion/src/completions/snippet.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/crates/ide_completion/src/completions/snippet.rs b/crates/ide_completion/src/completions/snippet.rs
index 0a3d594e41..6a0e09dd64 100644
--- a/crates/ide_completion/src/completions/snippet.rs
+++ b/crates/ide_completion/src/completions/snippet.rs
@@ -94,7 +94,17 @@ fn ${1:feature}() {
item.lookup_by("tfn");
item.add_to(acc);
- let item = snippet(ctx, cap, "macro_rules", "macro_rules! $1 {\n\t($2) => {\n\t\t$0\n\t};\n}");
+ let item = snippet(
+ ctx,
+ cap,
+ "macro_rules",
+ "\
+macro_rules! $1 {
+ ($2) => {
+ $0
+ };
+}",
+ );
item.add_to(acc);
}