rust/tests/ui/write_literal_2.stderr
2023-09-26 11:49:44 +00:00

193 lines
3.8 KiB
Plaintext

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",
| ^^^
|
help: try
|
LL ~ "some 1\
LL ~ {} \\ {}",
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:35:9
|
LL | "2",
| ^^^
|
help: try
|
LL ~ 2 \\ {}",
LL ~ "1",
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:36:9
|
LL | "3",
| ^^^
|
help: try
|
LL ~ {} \\ 3",
LL | "1",
LL ~ "2",
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:39:23
|
LL | writeln!(v, "{}", "\\");
| ^^^^
|
help: try
|
LL - writeln!(v, "{}", "\\");
LL + writeln!(v, "\\");
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:41: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:43: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:45: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:47: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:50:28
|
LL | writeln!(v, r#"{}{}"#, '#', '"');
| ^^^
error: literal with an empty format string
--> $DIR/write_literal_2.rs:50:33
|
LL | writeln!(v, r#"{}{}"#, '#', '"');
| ^^^
error: aborting due to 17 previous errors