2023-06-08 11:55:47 +00:00
|
|
|
error: unnecessary raw string literal
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:13:24
|
2023-06-08 11:55:47 +00:00
|
|
|
|
|
|
|
|
LL | writeln!(v, r"{}", r"{hello}");
|
|
|
|
| ^^^^^^^^^^ help: try: `"{hello}"`
|
|
|
|
|
|
2023-06-15 19:15:10 +00:00
|
|
|
= note: `-D clippy::needless-raw-strings` implied by `-D warnings`
|
2023-06-08 11:55:47 +00:00
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
error: literal with an empty format string
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/write_literal_2.rs:10:23
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | writeln!(v, "{}", "{hello}");
|
|
|
|
| ^^^^^^^^^
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::write-literal` implied by `-D warnings`
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - writeln!(v, "{}", "{hello}");
|
|
|
|
LL + writeln!(v, "{{hello}}");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:13:24
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | writeln!(v, r"{}", r"{hello}");
|
|
|
|
| ^^^^^^^^^^
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - writeln!(v, r"{}", r"{hello}");
|
|
|
|
LL + writeln!(v, r"{{hello}}");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:17:23
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL | writeln!(v, "{}", '\'');
|
2022-01-27 14:12:45 +00:00
|
|
|
| ^^^^
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL - writeln!(v, "{}", '\'');
|
2022-01-27 14:12:45 +00:00
|
|
|
LL + writeln!(v, "'");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:19:23
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | writeln!(v, "{}", '"');
|
|
|
|
| ^^^
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - writeln!(v, "{}", '"');
|
2023-08-14 15:59:00 +00:00
|
|
|
LL + writeln!(v, "\"");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:21:24
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
|
|
|
LL | writeln!(v, r"{}", '"');
|
|
|
|
| ^^^
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:23:24
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL | writeln!(v, r"{}", '\'');
|
2022-01-27 14:12:45 +00:00
|
|
|
| ^^^^
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL - writeln!(v, r"{}", '\'');
|
2022-01-27 14:12:45 +00:00
|
|
|
LL + writeln!(v, r"'");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:28:9
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL | / "hello \
|
2023-07-28 19:35:48 +00:00
|
|
|
LL | |
|
2021-03-25 18:29:11 +00:00
|
|
|
LL | | world!"
|
|
|
|
| |_______________^
|
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL ~ "some hello \
|
2023-07-28 19:35:48 +00:00
|
|
|
LL +
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ world!"
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:36:9
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-07-28 19:35:48 +00:00
|
|
|
LL | "1",
|
2021-03-25 18:29:11 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL ~ "some 1\
|
2023-07-28 19:35:48 +00:00
|
|
|
LL ~ {} \\ {}",
|
2021-03-21 14:29:21 +00:00
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:37:9
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-07-28 19:35:48 +00:00
|
|
|
LL | "2",
|
|
|
|
| ^^^
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL ~ 2 \\ {}",
|
2023-07-28 19:35:48 +00:00
|
|
|
LL ~ "1",
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:38:9
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-07-28 19:35:48 +00:00
|
|
|
LL | "3",
|
|
|
|
| ^^^
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL ~ {} \\ 3",
|
2023-07-28 19:35:48 +00:00
|
|
|
LL | "1",
|
|
|
|
LL ~ "2",
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
|
2022-08-30 12:20:49 +00:00
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:41:23
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL | writeln!(v, "{}", "\\");
|
2022-08-30 12:20:49 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL - writeln!(v, "{}", "\\");
|
|
|
|
LL + writeln!(v, "\\");
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:43:24
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL | writeln!(v, r"{}", "\\");
|
2022-08-30 12:20:49 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL - writeln!(v, r"{}", "\\");
|
|
|
|
LL + writeln!(v, r"\");
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:45:26
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL | writeln!(v, r#"{}"#, "\\");
|
2022-08-30 12:20:49 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL - writeln!(v, r#"{}"#, "\\");
|
|
|
|
LL + writeln!(v, r#"\"#);
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:47:23
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL | writeln!(v, "{}", r"\");
|
2022-08-30 12:20:49 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL - writeln!(v, "{}", r"\");
|
|
|
|
LL + writeln!(v, "\\");
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:49:23
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL | writeln!(v, "{}", "\r");
|
2022-08-30 12:20:49 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
2023-07-01 11:08:01 +00:00
|
|
|
help: try
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-08-14 15:59:00 +00:00
|
|
|
LL - writeln!(v, "{}", "\r");
|
|
|
|
LL + writeln!(v, "\r");
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:52:28
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-07-28 18:40:44 +00:00
|
|
|
LL | writeln!(v, r#"{}{}"#, '#', '"');
|
2022-08-30 12:20:49 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/write_literal_2.rs:52:33
|
2022-08-30 12:20:49 +00:00
|
|
|
|
|
2023-07-28 18:40:44 +00:00
|
|
|
LL | writeln!(v, r#"{}{}"#, '#', '"');
|
2022-08-30 12:20:49 +00:00
|
|
|
| ^^^
|
|
|
|
|
2023-06-08 11:55:47 +00:00
|
|
|
error: aborting due to 18 previous errors
|
2021-03-25 18:29:11 +00:00
|
|
|
|