]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/write_with_newline.rs
iterate List by value
[rust.git] / tests / ui / write_with_newline.rs
index dd80dc0cf9c5e4cd04e853f324699742d0dbeb08..93afd73d1114d257998089f1c683bfa090c06458 100644 (file)
@@ -1,3 +1,6 @@
+// FIXME: Ideally these suggestions would be fixed via rustfix. Blocked by rust-lang/rust#53934
+// // run-rustfix
+
 #![allow(clippy::write_literal)]
 #![warn(clippy::write_with_newline)]
 
@@ -46,4 +49,10 @@ fn main() {
         r"
 "
     );
+
+    // Don't warn on CRLF (#4208)
+    write!(&mut v, "\r\n");
+    write!(&mut v, "foo\r\n");
+    write!(&mut v, "\\r\n"); //~ ERROR
+    write!(&mut v, "foo\rbar\n");
 }