mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
complete raw identifier with "r#" prefix
This commit is contained in:
parent
5bb123d970
commit
f536766efb
12 changed files with 304 additions and 60 deletions
|
@ -24,9 +24,9 @@ pub(crate) fn render_record_lit(
|
|||
) -> RenderedLiteral {
|
||||
let completions = fields.iter().enumerate().format_with(", ", |(idx, field), f| {
|
||||
if snippet_cap.is_some() {
|
||||
f(&format_args!("{}: ${{{}:()}}", field.name(db), idx + 1))
|
||||
f(&format_args!("{}: ${{{}:()}}", field.name(db).escaped(), idx + 1))
|
||||
} else {
|
||||
f(&format_args!("{}: ()", field.name(db)))
|
||||
f(&format_args!("{}: ()", field.name(db).escaped()))
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue