2021-03-25 18:29:11 +00:00
|
|
|
error: literal with an empty format string
|
2022-01-27 14:12:45 +00:00
|
|
|
--> $DIR/write_literal_2.rs:9: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`
|
|
|
|
help: try this
|
|
|
|
|
|
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
|
2022-01-27 14:12:45 +00:00
|
|
|
--> $DIR/write_literal_2.rs:10: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
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
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
|
2022-01-27 14:12:45 +00:00
|
|
|
--> $DIR/write_literal_2.rs:11: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
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - writeln!(v, "{}", '/'');
|
|
|
|
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
|
2022-01-27 14:12:45 +00:00
|
|
|
--> $DIR/write_literal_2.rs:12: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
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - writeln!(v, "{}", '"');
|
|
|
|
LL + writeln!(v, "/"");
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
2022-09-21 17:02:37 +00:00
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:13:24
|
|
|
|
|
|
|
|
|
LL | writeln!(v, r"{}", '"');
|
|
|
|
| ^^^
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
error: literal with an empty format string
|
2022-01-27 14:12:45 +00:00
|
|
|
--> $DIR/write_literal_2.rs:14:24
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL | writeln!(v, r"{}", '/'');
|
|
|
|
| ^^^^
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2022-01-27 14:12:45 +00:00
|
|
|
LL - writeln!(v, r"{}", '/'');
|
|
|
|
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
|
|
|
|
--> $DIR/write_literal_2.rs:18:9
|
|
|
|
|
|
|
|
|
LL | / "hello /
|
|
|
|
LL | | world!"
|
|
|
|
| |_______________^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ "some hello /
|
|
|
|
LL ~ world!"
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:25:9
|
|
|
|
|
|
|
|
|
LL | "1", "2", "3",
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ "some 1/
|
|
|
|
LL ~ {} / {}", "2", "3",
|
2021-03-21 14:29:21 +00:00
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:25:14
|
|
|
|
|
|
|
|
|
LL | "1", "2", "3",
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ 2 / {}",
|
|
|
|
LL ~ "1", "3",
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:25:19
|
|
|
|
|
|
|
|
|
LL | "1", "2", "3",
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ {} / 3",
|
|
|
|
LL ~ "1", "2",
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
|
2022-09-21 17:02:37 +00:00
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:27:23
|
|
|
|
|
|
|
|
|
LL | writeln!(v, "{}", "/");
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
|
|
|
LL - writeln!(v, "{}", "/");
|
|
|
|
LL + writeln!(v, "/");
|
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:28:24
|
|
|
|
|
|
|
|
|
LL | writeln!(v, r"{}", "/");
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
|
|
|
LL - writeln!(v, r"{}", "/");
|
|
|
|
LL + writeln!(v, r"/");
|
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:29:26
|
|
|
|
|
|
|
|
|
LL | writeln!(v, r#"{}"#, "/");
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
|
|
|
LL - writeln!(v, r#"{}"#, "/");
|
|
|
|
LL + writeln!(v, r#"/"#);
|
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:30:23
|
|
|
|
|
|
|
|
|
LL | writeln!(v, "{}", r"/");
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
|
|
|
LL - writeln!(v, "{}", r"/");
|
|
|
|
LL + writeln!(v, "/");
|
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:31:23
|
|
|
|
|
|
|
|
|
LL | writeln!(v, "{}", "/r");
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
|
|
|
LL - writeln!(v, "{}", "/r");
|
|
|
|
LL + writeln!(v, "/r");
|
|
|
|
|
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:32:28
|
|
|
|
|
|
|
|
|
LL | writeln!(v, r#"{}{}"#, '#', '"'); // hard mode
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:32:33
|
|
|
|
|
|
|
|
|
LL | writeln!(v, r#"{}{}"#, '#', '"'); // hard mode
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: aborting due to 17 previous errors
|
2021-03-25 18:29:11 +00:00
|
|
|
|