diff options
| author | bors <bors@rust-lang.org> | 2022-07-20 10:51:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-20 10:51:31 +0000 |
| commit | f3e9b38e26646a75fdb3c25a2909bce68cde596c (patch) | |
| tree | a38761d98c53fd2dbffd30b0956796f41ed603b5 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 84544134f6e2e1f53a9ce3f821dbe7a70f924145 (diff) | |
| parent | cfc52adc65327190b5027de19a1a6d96dcf504ab (diff) | |
| download | rust-f3e9b38e26646a75fdb3c25a2909bce68cde596c.tar.gz rust-f3e9b38e26646a75fdb3c25a2909bce68cde596c.zip | |
Auto merge of #12646 - lowr:fix/11897, r=lowr
fix: escape receiver texts in completion This PR fixes #11897 by escaping '\\' and '$' in the text of the receiver position expression. See [here](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax) for the specification of the snippet syntax (especially [this section](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#grammar) discusses escaping). Although not all occurrences of '\\' and '$' have to be replaced, I chose to replace all as that's simpler and easier to understand. There *are* more clever ways to implement it, but I thought they were premature optimization for the time being (maybe I should put FIXME notes?).
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
