2019-05-23 18:11:38 +00:00
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
|
|
|
--> $DIR/write_with_newline.rs:13:5
|
2018-04-05 03:46:39 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | write!(&mut v, "Hello/n");
|
2018-07-22 22:19:07 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
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`
|
2019-05-23 18:11:38 +00:00
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - write!(&mut v, "Hello/n");
|
|
|
|
LL + writeln!(&mut v, "Hello");
|
|
|
|
|
|
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
|
|
|
|
--> $DIR/write_with_newline.rs:14:5
|
2018-04-05 03:46:39 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | write!(&mut v, "Hello {}/n", "world");
|
2018-07-22 22:19:07 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - write!(&mut v, "Hello {}/n", "world");
|
|
|
|
LL + writeln!(&mut v, "Hello {}", "world");
|
|
|
|
|
|
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
|
|
|
|
--> $DIR/write_with_newline.rs:15:5
|
2018-04-05 03:46:39 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | write!(&mut v, "Hello {} {}/n", "world", "#2");
|
2018-08-07 20:01:10 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - write!(&mut v, "Hello {} {}/n", "world", "#2");
|
|
|
|
LL + writeln!(&mut v, "Hello {} {}", "world", "#2");
|
|
|
|
|
|
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
|
|
|
|
--> $DIR/write_with_newline.rs:16:5
|
2018-04-05 03:46:39 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | write!(&mut v, "{}/n", 1265);
|
2018-07-22 22:19:07 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - write!(&mut v, "{}/n", 1265);
|
|
|
|
LL + writeln!(&mut v, "{}", 1265);
|
|
|
|
|
|
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
|
2020-09-24 12:49:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:17:5
|
|
|
|
|
|
|
|
|
LL | write!(&mut v, "/n");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - write!(&mut v, "/n");
|
|
|
|
LL + writeln!(&mut v);
|
|
|
|
|
|
2020-09-24 12:49:22 +00:00
|
|
|
|
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
|
|
|
--> $DIR/write_with_newline.rs:36:5
|
2018-12-11 06:28:25 +00:00
|
|
|
|
|
2019-02-18 03:32:58 +00:00
|
|
|
LL | write!(&mut v, "//n"); // should fail
|
2018-12-11 06:28:25 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - write!(&mut v, "//n"); // should fail
|
|
|
|
LL + writeln!(&mut v, "/"); // should fail
|
|
|
|
|
|
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
|
2020-09-24 12:49:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:43:5
|
2019-02-18 16:39:23 +00:00
|
|
|
|
|
|
|
|
LL | / write!(
|
|
|
|
LL | | &mut v,
|
|
|
|
LL | | "
|
|
|
|
LL | | "
|
|
|
|
LL | | );
|
|
|
|
| |_____^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ writeln!(
|
2019-05-23 18:11:38 +00:00
|
|
|
LL | &mut v,
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ ""
|
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
|
2020-09-24 12:49:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:48:5
|
2019-02-18 16:39:23 +00:00
|
|
|
|
|
|
|
|
LL | / write!(
|
|
|
|
LL | | &mut v,
|
|
|
|
LL | | r"
|
|
|
|
LL | | "
|
|
|
|
LL | | );
|
|
|
|
| |_____^
|
2019-10-26 19:53:42 +00:00
|
|
|
|
|
2019-05-23 18:11:38 +00:00
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ writeln!(
|
2019-05-23 18:11:38 +00:00
|
|
|
LL | &mut v,
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ r""
|
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
|
2020-09-24 12:49:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:57:5
|
2019-11-03 04:41:22 +00:00
|
|
|
|
|
|
|
|
LL | write!(&mut v, "/r/n"); //~ ERROR
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - write!(&mut v, "/r/n"); //~ ERROR
|
|
|
|
LL + writeln!(&mut v, "/r"); //~ ERROR
|
|
|
|
|
|
2019-11-03 04:41:22 +00:00
|
|
|
|
|
|
|
error: using `write!()` with a format string that ends in a single newline
|
2020-09-24 12:49:22 +00:00
|
|
|
--> $DIR/write_with_newline.rs:58:5
|
2019-11-03 04:41:22 +00:00
|
|
|
|
|
|
|
|
LL | write!(&mut v, "foo/rbar/n");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `writeln!()` instead
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - write!(&mut v, "foo/rbar/n");
|
|
|
|
LL + writeln!(&mut v, "foo/rbar");
|
|
|
|
|
|
2019-11-03 04:41:22 +00:00
|
|
|
|
2020-09-24 12:49:22 +00:00
|
|
|
error: aborting due to 10 previous errors
|
2018-04-05 03:46:39 +00:00
|
|
|
|