1 error: using `write!()` with a format string that ends in a single newline
2 --> $DIR/write_with_newline.rs:13:5
4 LL | write!(&mut v, "Hello/n");
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::write-with-newline` implied by `-D warnings`
8 help: use `writeln!()` instead
10 LL - write!(&mut v, "Hello/n");
11 LL + writeln!(&mut v, "Hello");
14 error: using `write!()` with a format string that ends in a single newline
15 --> $DIR/write_with_newline.rs:14:5
17 LL | write!(&mut v, "Hello {}/n", "world");
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 help: use `writeln!()` instead
22 LL - write!(&mut v, "Hello {}/n", "world");
23 LL + writeln!(&mut v, "Hello {}", "world");
26 error: using `write!()` with a format string that ends in a single newline
27 --> $DIR/write_with_newline.rs:15:5
29 LL | write!(&mut v, "Hello {} {}/n", "world", "#2");
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 help: use `writeln!()` instead
34 LL - write!(&mut v, "Hello {} {}/n", "world", "#2");
35 LL + writeln!(&mut v, "Hello {} {}", "world", "#2");
38 error: using `write!()` with a format string that ends in a single newline
39 --> $DIR/write_with_newline.rs:16:5
41 LL | write!(&mut v, "{}/n", 1265);
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 help: use `writeln!()` instead
46 LL - write!(&mut v, "{}/n", 1265);
47 LL + writeln!(&mut v, "{}", 1265);
50 error: using `write!()` with a format string that ends in a single newline
51 --> $DIR/write_with_newline.rs:17:5
53 LL | write!(&mut v, "/n");
54 | ^^^^^^^^^^^^^^^^^^^^
56 help: use `writeln!()` instead
58 LL - write!(&mut v, "/n");
59 LL + writeln!(&mut v);
62 error: using `write!()` with a format string that ends in a single newline
63 --> $DIR/write_with_newline.rs:36:5
65 LL | write!(&mut v, "//n"); // should fail
66 | ^^^^^^^^^^^^^^^^^^^^^^
68 help: use `writeln!()` instead
70 LL - write!(&mut v, "//n"); // should fail
71 LL + writeln!(&mut v, "/"); // should fail
74 error: using `write!()` with a format string that ends in a single newline
75 --> $DIR/write_with_newline.rs:43:5
84 help: use `writeln!()` instead
91 error: using `write!()` with a format string that ends in a single newline
92 --> $DIR/write_with_newline.rs:48:5
101 help: use `writeln!()` instead
108 error: using `write!()` with a format string that ends in a single newline
109 --> $DIR/write_with_newline.rs:57:5
111 LL | write!(&mut v, "/r/n"); //~ ERROR
112 | ^^^^^^^^^^^^^^^^^^^^^^^
114 help: use `writeln!()` instead
116 LL - write!(&mut v, "/r/n"); //~ ERROR
117 LL + writeln!(&mut v, "/r"); //~ ERROR
120 error: using `write!()` with a format string that ends in a single newline
121 --> $DIR/write_with_newline.rs:58:5
123 LL | write!(&mut v, "foo/rbar/n");
124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126 help: use `writeln!()` instead
128 LL - write!(&mut v, "foo/rbar/n");
129 LL + writeln!(&mut v, "foo/rbar");
132 error: aborting due to 10 previous errors