2021-03-25 18:29:11 +00:00
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:9:28
|
|
|
|
|
|
|
|
|
LL | writeln!(&mut v, "{}", "{hello}");
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::write-literal` implied by `-D warnings`
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - writeln!(&mut v, "{}", "{hello}");
|
|
|
|
LL + writeln!(&mut v, "{{hello}}");
|
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:10:29
|
|
|
|
|
|
|
|
|
LL | writeln!(&mut v, r"{}", r"{hello}");
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - writeln!(&mut v, r"{}", r"{hello}");
|
|
|
|
LL + writeln!(&mut v, r"{{hello}}");
|
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:11:28
|
|
|
|
|
|
|
|
|
LL | writeln!(&mut v, "{}", '/'');
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - writeln!(&mut v, "{}", '/'');
|
|
|
|
LL + writeln!(&mut v, "'");
|
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:12:28
|
|
|
|
|
|
|
|
|
LL | writeln!(&mut v, "{}", '"');
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - writeln!(&mut v, "{}", '"');
|
|
|
|
LL + writeln!(&mut v, "/"");
|
|
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
|
|
--> $DIR/write_literal_2.rs:14:29
|
|
|
|
|
|
|
|
|
LL | writeln!(&mut v, r"{}", '/'');
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
help: try this
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL - writeln!(&mut v, r"{}", '/'');
|
|
|
|
LL + writeln!(&mut v, r"'");
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
|
|
|
|