@@ -44,7 +44,18 @@ LL |     writeln!(&mut v, "{}", 1265);
4444   |     ^^^^^^^            --
4545
4646error: using `write!()` with a format string that ends in a single newline
47-   --> $DIR/write_with_newline.rs:35:5
47+   --> $DIR/write_with_newline.rs:17:5
48+    |
49+ LL |     write!(&mut v, "/n");
50+    |     ^^^^^^^^^^^^^^^^^^^^
51+    |
52+ help: use `writeln!()` instead
53+    |
54+ LL |     writeln!(&mut v, );
55+    |     ^^^^^^^         --
56+ 
57+ error: using `write!()` with a format string that ends in a single newline
58+   --> $DIR/write_with_newline.rs:36:5
4859   |
4960LL |     write!(&mut v, "//n"); // should fail
5061   |     ^^^^^^^^^^^^^^^^^^^^^^
@@ -55,7 +66,7 @@ LL |     writeln!(&mut v, "/"); // should fail
5566   |     ^^^^^^^            --
5667
5768error: using `write!()` with a format string that ends in a single newline
58-   --> $DIR/write_with_newline.rs:42 :5
69+   --> $DIR/write_with_newline.rs:43 :5
5970   |
6071LL | /     write!(
6172LL | |         &mut v,
@@ -72,7 +83,7 @@ LL |         ""
7283   |
7384
7485error: using `write!()` with a format string that ends in a single newline
75-   --> $DIR/write_with_newline.rs:47 :5
86+   --> $DIR/write_with_newline.rs:48 :5
7687   |
7788LL | /     write!(
7889LL | |         &mut v,
@@ -89,7 +100,7 @@ LL |         r""
89100   |
90101
91102error: using `write!()` with a format string that ends in a single newline
92-   --> $DIR/write_with_newline.rs:56 :5
103+   --> $DIR/write_with_newline.rs:57 :5
93104   |
94105LL |     write!(&mut v, "/r/n"); //~ ERROR
95106   |     ^^^^^^^^^^^^^^^^^^^^^^^
@@ -100,7 +111,7 @@ LL |     writeln!(&mut v, "/r"); //~ ERROR
100111   |     ^^^^^^^             --
101112
102113error: using `write!()` with a format string that ends in a single newline
103-   --> $DIR/write_with_newline.rs:57 :5
114+   --> $DIR/write_with_newline.rs:58 :5
104115   |
105116LL |     write!(&mut v, "foo/rbar/n");
106117   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -110,5 +121,5 @@ help: use `writeln!()` instead
110121LL |     writeln!(&mut v, "foo/rbar");
111122   |     ^^^^^^^                  --
112123
113- error: aborting due to 9  previous errors
124+ error: aborting due to 10  previous errors
114125
0 commit comments