rust/tests/ui/write_with_newline.stderr

55 lines
1.8 KiB
Plaintext
Raw Normal View History

error: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead
--> $DIR/write_with_newline.rs:10:5
|
2018-12-27 16:57:55 +01:00
LL | write!(&mut v, "Hello/n");
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::write-with-newline` implied by `-D warnings`
error: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead
--> $DIR/write_with_newline.rs:11:5
|
2018-12-27 16:57:55 +01:00
LL | write!(&mut v, "Hello {}/n", "world");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead
--> $DIR/write_with_newline.rs:12:5
|
2018-12-27 16:57:55 +01:00
LL | write!(&mut v, "Hello {} {}/n", "world", "#2");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead
--> $DIR/write_with_newline.rs:13:5
|
2018-12-27 16:57:55 +01:00
LL | write!(&mut v, "{}/n", 1265);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead
--> $DIR/write_with_newline.rs:32:5
|
LL | write!(&mut v, "//n"); // should fail
| ^^^^^^^^^^^^^^^^^^^^^^
error: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead
--> $DIR/write_with_newline.rs:39:5
|
LL | / write!(
LL | | &mut v,
LL | | "
LL | | "
LL | | );
| |_____^
error: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead
--> $DIR/write_with_newline.rs:44:5
|
LL | / write!(
LL | | &mut v,
LL | | r"
LL | | "
LL | | );
| |_____^
error: aborting due to 7 previous errors