]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/eprint_with_newline.rs
Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy
[rust.git] / src / tools / clippy / tests / ui / eprint_with_newline.rs
index 8df32649ad948b3d85aa3fae9a2bc468def694eb..de5e121be877460b07e36537f3b6e05ae07fa56d 100644 (file)
@@ -45,5 +45,13 @@ fn main() {
     eprint!("\r\n");
     eprint!("foo\r\n");
     eprint!("\\r\n"); //~ ERROR
-    eprint!("foo\rbar\n") // ~ ERROR
+    eprint!("foo\rbar\n");
+
+    // Ignore expanded format strings
+    macro_rules! newline {
+        () => {
+            "\n"
+        };
+    }
+    eprint!(newline!());
 }