2
0
Fork 0
mirror of https://github.com/rust-lang/rust-clippy synced 2024-12-20 18:13:36 +00:00
rust-clippy/tests/ui/write_with_newline.stderr

87 lines
2.3 KiB
Text
Raw Normal View History

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