Update format string tests to explicitly escape multiple newlines

From what I can tell, the goal of the tests is to ensure that the error
formatting is correct.  I think this is still being tested as intended
after this change.
This commit is contained in:
Anton Golov 2021-07-31 23:09:19 +02:00
parent a03fbfe2ff
commit 2dff700c4f
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ fn main() {
a");
//~^ ERROR invalid format string
format!("{ \
\
b");
//~^ ERROR invalid format string
format!(r#"{ \
@ -38,12 +38,12 @@ fn main() {
{ \
\
b \
\
");
//~^^^ ERROR invalid format string
format!(r#"
raw { \
\
c"#);
//~^^^ ERROR invalid format string
format!(r#"

View File

@ -19,7 +19,7 @@ error: invalid format string: expected `'}'`, found `'b'`
|
LL | format!("{ \
| - because of this opening brace
LL |
LL | \
LL | b");
| ^ expected `}` in format string
|