mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
b9045fabf8
parse_format: treat r" as a literal This PR changes `format_args!` internal parsing machinery to treat raw strings starting `r"` as a literal. Currently `"` and `r#` are recognised as valid starting combinations for string literals, but `r"` is not. This was noticed when debugging https://github.com/rust-lang/rust/issues/67984#issuecomment-753413156 As well as fixing the behavior observed in that comment, this improves diagnostic spans for `r"` formatting strings.