Skip to content

Commit 2d28d9f

Browse files
committed
Add failing test for #3778 write_with_newline
Literal `\n` characters (not a newline) in a `r"raw"` string should not fail the lint.
1 parent a71acac commit 2d28d9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/ui/write_with_newline.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,7 @@ fn main() {
3131
write!(&mut v, "\\n"); // #3514
3232
write!(&mut v, "\\\n");
3333
write!(&mut v, "\\\\n");
34+
35+
// Raw strings
36+
write!(&mut v, r"\n"); // #3778
3437
}

0 commit comments

Comments
 (0)