From 2dff700c4ff3fce32104f614eff8396ef5b0e39a Mon Sep 17 00:00:00 2001 From: Anton Golov Date: Sat, 31 Jul 2021 23:09:19 +0200 Subject: 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. --- src/test/ui/fmt/format-string-error-2.rs | 6 +++--- src/test/ui/fmt/format-string-error-2.stderr | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test') 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 | -- cgit 1.4.1-3-g733a5