]> git.lizzy.rs Git - rust.git/commitdiff
Add failing test for #3778 write_with_newline
authorphil <uniphil@gmail.com>
Mon, 18 Feb 2019 03:32:58 +0000 (22:32 -0500)
committerphil <uniphil@gmail.com>
Mon, 18 Feb 2019 03:32:58 +0000 (22:32 -0500)
Literal `\n` characters (not a newline) in a `r"raw"` string should not
fail the lint.

tests/ui/write_with_newline.rs

index 2f53d4561af8ceda2b01a1c01d8cdf81a052093b..02e043f9233e0ffc6a64dc1060cec1bdba8a0811 100644 (file)
@@ -31,4 +31,7 @@ fn main() {
     write!(&mut v, "\\n"); // #3514
     write!(&mut v, "\\\n");
     write!(&mut v, "\\\\n");
+
+    // Raw strings
+    write!(&mut v, r"\n"); // #3778
 }