-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Description
this problem arised from the solution to the issue #20999, where i requested snippets for &raw const and &raw mut and got told to use custom snippets, which expanded to missing code when i tried to expand them.
rust-analyzer version: rust-analyzer version: 1.93.0-nightly (25d319a 2025-11-11)
rustc version:
rustc 1.93.0-nightly (25d319a0f 2025-11-11)
binary: rustc
commit-hash: 25d319a0f656ee8faa7a534da299e76e96068a40
commit-date: 2025-11-11
host: x86_64-unknown-linux-gnu
release: 1.93.0-nightly
LLVM version: 21.1.5
editor or extension: VSCode extension v0.3.2675 with nightly server
relevant settings: custom snippets VScode:
"rust-analyzer.completion.snippets.custom": {
"Grouping": {
"postfix": "group",
"body": "(${receiver})",
"description": "Wrap the expression in parens `(expr)`",
"scope": "expr",
}
}
code snippet to reproduce:
&raw mut (a).b
// apply Grouping snippet
&raw mut (a.)b.group<TAB>
// observed
(&mut (a).b)
// expected
(&raw mut (a).b)