rust-clippy/tests/ui/write_literal_2.stderr

162 lines
3.4 KiB
Text
Raw Normal View History

error: literal with an empty format string
2024-02-17 12:16:29 +00:00
--> tests/ui/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}}");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
2024-02-17 12:16:29 +00:00
--> tests/ui/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}}");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
2024-02-17 12:16:29 +00:00
--> tests/ui/write_literal_2.rs:15:23
|
LL | writeln!(v, "{}", '\'');
| ^^^^
|
help: try
|
LL - writeln!(v, "{}", '\'');
LL + writeln!(v, "'");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
2024-02-17 12:16:29 +00:00
--> tests/ui/write_literal_2.rs:17:23
|
LL | writeln!(v, "{}", '"');
| ^^^
|
help: try
|
LL - writeln!(v, "{}", '"');
LL + writeln!(v, "\"");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
2024-02-17 12:16:29 +00:00
--> tests/ui/write_literal_2.rs:19:24
|
LL | writeln!(v, r"{}", '"');
| ^^^
error: literal with an empty format string
2024-02-17 12:16:29 +00:00
--> tests/ui/write_literal_2.rs:21:24
|
LL | writeln!(v, r"{}", '\'');
| ^^^^
|
help: try
|
LL - writeln!(v, r"{}", '\'');
LL + writeln!(v, r"'");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
2024-02-17 12:16:29 +00:00
--> tests/ui/write_literal_2.rs:26:9
|
LL | / "hello \
LL | | world!",
| |_______________^
|
help: try
|
LL ~ "some hello \
LL ~ world!",
|
error: literal with an empty format string
2024-02-17 12:16:29 +00:00
--> tests/ui/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
2024-02-17 12:16:29 +00:00
--> tests/ui/write_literal_2.rs:36:23
|
LL | writeln!(v, "{}", "\\");
| ^^^^
|
help: try
|
LL - writeln!(v, "{}", "\\");
LL + writeln!(v, "\\");
|
error: literal with an empty format string
2024-02-17 12:16:29 +00:00
--> tests/ui/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
2024-02-17 12:16:29 +00:00
--> tests/ui/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
2024-02-17 12:16:29 +00:00
--> tests/ui/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
2024-02-17 12:16:29 +00:00
--> tests/ui/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
2024-02-17 12:16:29 +00:00
--> tests/ui/write_literal_2.rs:47:28
|
LL | writeln!(v, r#"{}{}"#, '#', '"');
| ^^^^^^^^
error: aborting due to 14 previous errors