summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/write_with_newline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/write_with_newline.rs')
-rw-r--r--src/tools/clippy/tests/ui/write_with_newline.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/write_with_newline.rs b/src/tools/clippy/tests/ui/write_with_newline.rs
index 446d6914d..b79364c87 100644
--- a/src/tools/clippy/tests/ui/write_with_newline.rs
+++ b/src/tools/clippy/tests/ui/write_with_newline.rs
@@ -56,4 +56,12 @@ fn main() {
write!(v, "foo\r\n");
write!(v, "\\r\n"); //~ ERROR
write!(v, "foo\rbar\n");
+
+ // Ignore expanded format strings
+ macro_rules! newline {
+ () => {
+ "\n"
+ };
+ }
+ write!(v, newline!());
}