From 04a19b93c63d090b8c31ddea700859825bd28334 Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Sat, 6 Feb 2021 15:01:07 +0000 Subject: parse_format: treat r" as a literal --- compiler/rustc_parse_format/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_parse_format/src') 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, ) -> (Vec, 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), }; -- cgit 1.4.1-3-g733a5