Skip to content

Commit 2dff700

Browse files
committed
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.
1 parent a03fbfe commit 2dff700

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/test/ui/fmt/format-string-error-2.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fn main() {
55
a");
66
//~^ ERROR invalid format string
77
format!("{ \
8-
8+
\
99
b");
1010
//~^ ERROR invalid format string
1111
format!(r#"{ \
@@ -38,12 +38,12 @@ fn main() {
3838
{ \
3939
\
4040
b \
41-
41+
\
4242
");
4343
//~^^^ ERROR invalid format string
4444
format!(r#"
4545
raw { \
46-
46+
\
4747
c"#);
4848
//~^^^ ERROR invalid format string
4949
format!(r#"

src/test/ui/fmt/format-string-error-2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ error: invalid format string: expected `'}'`, found `'b'`
1919
|
2020
LL | format!("{ \
2121
| - because of this opening brace
22-
LL |
22+
LL | \
2323
LL | b");
2424
| ^ expected `}` in format string
2525
|

0 commit comments

Comments
 (0)