2019-05-23 18:11:38 +00:00
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:12:5
|
2018-04-05 03:46:39 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | write!(v, "Hello/n");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
2018-04-05 03:46:39 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::write-with-newline` implied by `-D warnings`
|
2022-08-30 12:20:49 +00:00
|
|
|
help: use `writeln!` instead
|
2019-05-23 18:11:38 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - write!(v, "Hello/n");
|
|
|
|
LL + writeln!(v, "Hello");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2018-04-05 03:46:39 +00:00
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:13:5
|
2018-04-05 03:46:39 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | write!(v, "Hello {}/n", "world");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
help: use `writeln!` instead
|
2019-05-23 18:11:38 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - write!(v, "Hello {}/n", "world");
|
|
|
|
LL + writeln!(v, "Hello {}", "world");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2018-04-05 03:46:39 +00:00
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:14:5
|
2018-04-05 03:46:39 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | write!(v, "Hello {} {}/n", "world", "#2");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
help: use `writeln!` instead
|
2019-05-23 18:11:38 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - write!(v, "Hello {} {}/n", "world", "#2");
|
|
|
|
LL + writeln!(v, "Hello {} {}", "world", "#2");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2018-04-05 03:46:39 +00:00
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:15:5
|
2018-04-05 03:46:39 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | write!(v, "{}/n", 1265);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
help: use `writeln!` instead
|
2019-05-23 18:11:38 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - write!(v, "{}/n", 1265);
|
|
|
|
LL + writeln!(v, "{}", 1265);
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2018-04-05 03:46:39 +00:00
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:16:5
|
2020-09-24 12:49:22 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | write!(v, "/n");
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2020-09-24 12:49:22 +00:00
|
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
help: use `writeln!` instead
|
2020-09-24 12:49:22 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - write!(v, "/n");
|
|
|
|
LL + writeln!(v);
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2020-09-24 12:49:22 +00:00
|
|
|
|
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:35:5
|
2018-12-11 06:28:25 +00:00
|
|
|
|
|
2023-04-20 15:19:36 +00:00
|
|
|
LL | write!(v, "///n"); // should fail
|
2022-01-27 14:12:45 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
help: use `writeln!` instead
|
2019-05-23 18:11:38 +00:00
|
|
|
|
|
2023-04-20 15:19:36 +00:00
|
|
|
LL - write!(v, "///n"); // should fail
|
|
|
|
LL + writeln!(v, "//"); // should fail
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2018-12-11 06:28:25 +00:00
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:42:5
|
2019-02-18 16:39:23 +00:00
|
|
|
|
|
|
|
|
LL | / write!(
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | | v,
|
2019-02-18 16:39:23 +00:00
|
|
|
LL | | "
|
|
|
|
LL | | "
|
|
|
|
LL | | );
|
|
|
|
| |_____^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
help: use `writeln!` instead
|
2019-05-23 18:11:38 +00:00
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ writeln!(
|
2022-08-30 12:20:49 +00:00
|
|
|
LL ~ v
|
2019-05-23 18:11:38 +00:00
|
|
|
|
|
2019-02-18 16:39:23 +00:00
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:47:5
|
2019-02-18 16:39:23 +00:00
|
|
|
|
|
|
|
|
LL | / write!(
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | | v,
|
2019-02-18 16:39:23 +00:00
|
|
|
LL | | r"
|
|
|
|
LL | | "
|
|
|
|
LL | | );
|
|
|
|
| |_____^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
help: use `writeln!` instead
|
2019-05-23 18:11:38 +00:00
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ writeln!(
|
2022-08-30 12:20:49 +00:00
|
|
|
LL ~ v
|
2019-05-23 18:11:38 +00:00
|
|
|
|
|
2019-02-18 16:39:23 +00:00
|
|
|
|
2019-11-03 04:41:22 +00:00
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:56:5
|
2019-11-03 04:41:22 +00:00
|
|
|
|
|
2023-04-20 15:19:36 +00:00
|
|
|
LL | write!(v, "//r/n");
|
2022-01-27 14:12:45 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
2019-11-03 04:41:22 +00:00
|
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
help: use `writeln!` instead
|
2019-11-03 04:41:22 +00:00
|
|
|
|
|
2023-04-20 15:19:36 +00:00
|
|
|
LL - write!(v, "//r/n");
|
|
|
|
LL + writeln!(v, "//r");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2019-11-03 04:41:22 +00:00
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
error: aborting due to 9 previous errors
|
2018-04-05 03:46:39 +00:00
|
|
|
|