mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 12:03:28 +00:00
38d4ac7cea
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
34 lines
1.3 KiB
Text
34 lines
1.3 KiB
Text
error: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead
|
|
--> $DIR/write_with_newline.rs:10:5
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 5 previous errors
|
|
|