mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-11 22:02:55 +00:00
161 lines
3.3 KiB
Text
161 lines
3.3 KiB
Text
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:10:23
|
|
|
|
|
LL | writeln!(v, "{}", "{hello}");
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::write-literal` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::write_literal)]`
|
|
help: try
|
|
|
|
|
LL - writeln!(v, "{}", "{hello}");
|
|
LL + writeln!(v, "{{hello}}");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:13:24
|
|
|
|
|
LL | writeln!(v, r"{}", r"{hello}");
|
|
| ^^^^^^^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, r"{}", r"{hello}");
|
|
LL + writeln!(v, r"{{hello}}");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:15:23
|
|
|
|
|
LL | writeln!(v, "{}", '\'');
|
|
| ^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, "{}", '\'');
|
|
LL + writeln!(v, "'");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:17:23
|
|
|
|
|
LL | writeln!(v, "{}", '"');
|
|
| ^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, "{}", '"');
|
|
LL + writeln!(v, "\"");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:19:24
|
|
|
|
|
LL | writeln!(v, r"{}", '"');
|
|
| ^^^
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:21:24
|
|
|
|
|
LL | writeln!(v, r"{}", '\'');
|
|
| ^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, r"{}", '\'');
|
|
LL + writeln!(v, r"'");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:26:9
|
|
|
|
|
LL | / "hello \
|
|
LL | | world!",
|
|
| |_______________^
|
|
|
|
|
help: try
|
|
|
|
|
LL ~ "some hello \
|
|
LL ~ world!",
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:34:9
|
|
|
|
|
LL | "1", "2", "3",
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL ~ "some 1\
|
|
LL ~ 2 \\ 3",
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:36:23
|
|
|
|
|
LL | writeln!(v, "{}", "\\");
|
|
| ^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, "{}", "\\");
|
|
LL + writeln!(v, "\\");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:38:24
|
|
|
|
|
LL | writeln!(v, r"{}", "\\");
|
|
| ^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, r"{}", "\\");
|
|
LL + writeln!(v, r"\");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:40:26
|
|
|
|
|
LL | writeln!(v, r#"{}"#, "\\");
|
|
| ^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, r#"{}"#, "\\");
|
|
LL + writeln!(v, r#"\"#);
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:42:23
|
|
|
|
|
LL | writeln!(v, "{}", r"\");
|
|
| ^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, "{}", r"\");
|
|
LL + writeln!(v, "\\");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:44:23
|
|
|
|
|
LL | writeln!(v, "{}", "\r");
|
|
| ^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, "{}", "\r");
|
|
LL + writeln!(v, "\r");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:47:28
|
|
|
|
|
LL | writeln!(v, r#"{}{}"#, '#', '"');
|
|
| ^^^^^^^^
|
|
|
|
error: aborting due to 14 previous errors
|
|
|