Skip to content

Commit

Permalink
Update format string tests to explicitly escape multiple newlines
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jesyspa committed Aug 11, 2021
1 parent a03fbfe commit 2dff700
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/test/ui/fmt/format-string-error-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn main() {
a");
//~^ ERROR invalid format string
format!("{ \
\
b");
//~^ ERROR invalid format string
format!(r#"{ \
Expand Down Expand Up @@ -38,12 +38,12 @@ fn main() {
{ \
\
b \
\
");
//~^^^ ERROR invalid format string
format!(r#"
raw { \
\
c"#);
//~^^^ ERROR invalid format string
format!(r#"
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/fmt/format-string-error-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
|
Expand Down

0 comments on commit 2dff700

Please sign in to comment.