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