summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/eprint_with_newline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/eprint_with_newline.rs')
-rw-r--r--src/tools/clippy/tests/ui/eprint_with_newline.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tools/clippy/tests/ui/eprint_with_newline.rs b/src/tools/clippy/tests/ui/eprint_with_newline.rs
index 8df32649a..de5e121be 100644
--- a/src/tools/clippy/tests/ui/eprint_with_newline.rs
+++ b/src/tools/clippy/tests/ui/eprint_with_newline.rs
@@ -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!());
}