diff options
| author | Anton Golov <jesyspa@gmail.com> | 2021-07-31 23:09:19 +0200 |
|---|---|---|
| committer | Anton Golov <jesyspa@gmail.com> | 2021-08-11 11:35:08 +0200 |
| commit | 2dff700c4ff3fce32104f614eff8396ef5b0e39a (patch) | |
| tree | 2f52ed66b2d11dad03aced01f7f1a164c40bd297 | |
| parent | a03fbfe2ff3e7dd03af42d337b11552e782e2dc4 (diff) | |
| download | rust-2dff700c4ff3fce32104f614eff8396ef5b0e39a.tar.gz rust-2dff700c4ff3fce32104f614eff8396ef5b0e39a.zip | |
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.
| -rw-r--r-- | src/test/ui/fmt/format-string-error-2.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/fmt/format-string-error-2.stderr | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/fmt/format-string-error-2.rs b/src/test/ui/fmt/format-string-error-2.rs index 69fed2cb69a..1f7f0d8f6be 100644 --- a/src/test/ui/fmt/format-string-error-2.rs +++ b/src/test/ui/fmt/format-string-error-2.rs @@ -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#" diff --git a/src/test/ui/fmt/format-string-error-2.stderr b/src/test/ui/fmt/format-string-error-2.stderr index c421fe49ef0..76cdfbb93bf 100644 --- a/src/test/ui/fmt/format-string-error-2.stderr +++ b/src/test/ui/fmt/format-string-error-2.stderr @@ -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 | |
