diff options
| author | bors <bors@rust-lang.org> | 2021-12-03 00:23:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-03 00:23:59 +0000 |
| commit | fddef249a23018737b27b91e33129a0ac8a400ce (patch) | |
| tree | 49b806b1f0eeccd9bc6af3d6dbdbed4483eb0f05 /compiler/rustc_codegen_llvm/src | |
| parent | d5d830a50f0a0211bd0820aa8403df8d47f109c3 (diff) | |
| parent | 5cc451bc6cb9fc74c85e44be4a510e9c14f03914 (diff) | |
| download | rust-fddef249a23018737b27b91e33129a0ac8a400ce.tar.gz rust-fddef249a23018737b27b91e33129a0ac8a400ce.zip | |
Auto merge of #8067 - frobiac:8060-backslash_escaped_in_single_char_pattern, r=giraffate
Escape backslash in single_char_pattern.rs Escape backslash in single_char_pattern. Previously, the proposed clippy fix for a single backslash in raw strings ```r"\"``` or ```r#"\"#``` was also only an unescaped, *single* ```'\'```: ```shell warning: single-character string constant used as pattern 2 | let s = r#"abc\xyz/"#.find(r"\"); | ^^^^ help: try using a `char` instead: `'\'` | = note: `#[warn(clippy::single_char_pattern)]` on by default ``` This PR corrects this to a properly escaped *double* backslash ```'\\'```. I haven't come up with any other problematic cases, a single quote was already handled. Closes: #8060 changelog: Escape backslash in ``[`single_char_pattern`]``
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
