diff options
| author | David Hewitt <1939362+davidhewitt@users.noreply.github.com> | 2021-02-06 15:01:07 +0000 |
|---|---|---|
| committer | David Hewitt <1939362+davidhewitt@users.noreply.github.com> | 2021-02-06 15:01:07 +0000 |
| commit | 04a19b93c63d090b8c31ddea700859825bd28334 (patch) | |
| tree | 80abb3345ef76aaa3f3508008c7e28f8a9826e55 /compiler/rustc_parse_format/src | |
| parent | 399b6452b5d9982438be208668bc758479f13725 (diff) | |
| download | rust-04a19b93c63d090b8c31ddea700859825bd28334.tar.gz rust-04a19b93c63d090b8c31ddea700859825bd28334.zip | |
parse_format: treat r" as a literal
Diffstat (limited to 'compiler/rustc_parse_format/src')
| -rw-r--r-- | compiler/rustc_parse_format/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs index f150f7a41ae..92d974690b5 100644 --- a/compiler/rustc_parse_format/src/lib.rs +++ b/compiler/rustc_parse_format/src/lib.rs @@ -730,7 +730,7 @@ fn find_skips_from_snippet( str_style: Option<usize>, ) -> (Vec<usize>, bool) { let snippet = match snippet { - Some(ref s) if s.starts_with('"') || s.starts_with("r#") => s, + Some(ref s) if s.starts_with('"') || s.starts_with("r\"") || s.starts_with("r#") => s, _ => return (vec![], false), }; |
