]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/write_with_newline.stderr
iterate List by value
[rust.git] / tests / ui / write_with_newline.stderr
index 4d95bfeb17f405cfb84cdd61db3d47ea537fc5f6..2473329ca7276e149eb6702d32ea76c87de995c6 100644 (file)
@@ -88,5 +88,27 @@ LL |         &mut v,
 LL |         r""
    |
 
-error: aborting due to 7 previous errors
+error: using `write!()` with a format string that ends in a single newline
+  --> $DIR/write_with_newline.rs:56:5
+   |
+LL |     write!(&mut v, "/r/n"); //~ ERROR
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: use `writeln!()` instead
+   |
+LL |     writeln!(&mut v, "/r"); //~ ERROR
+   |     ^^^^^^^             --
+
+error: using `write!()` with a format string that ends in a single newline
+  --> $DIR/write_with_newline.rs:57:5
+   |
+LL |     write!(&mut v, "foo/rbar/n");
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: use `writeln!()` instead
+   |
+LL |     writeln!(&mut v, "foo/rbar");
+   |     ^^^^^^^                  --
+
+error: aborting due to 9 previous errors