Skip to content

Commit 1d2bd0e

Browse files
committed
Auto merge of rust-lang#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=
2 parents b24b82f + b06c95a commit 1d2bd0e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

crates/ide_completion/src/completions/snippet.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,17 @@ fn ${1:feature}() {
9494
item.lookup_by("tfn");
9595
item.add_to(acc);
9696

97-
let item = snippet(ctx, cap, "macro_rules", "macro_rules! $1 {\n\t($2) => {\n\t\t$0\n\t};\n}");
97+
let item = snippet(
98+
ctx,
99+
cap,
100+
"macro_rules",
101+
"\
102+
macro_rules! $1 {
103+
($2) => {
104+
$0
105+
};
106+
}",
107+
);
98108
item.add_to(acc);
99109
}
100110

0 commit comments

Comments
 (0)