mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 02:23:19 +00:00
198 lines
4.1 KiB
Text
198 lines
4.1 KiB
Text
error: unnecessary raw string literal
|
|
--> $DIR/write_literal_2.rs:11:24
|
|
|
|
|
LL | writeln!(v, r"{}", r"{hello}");
|
|
| ^^^^^^^^^^ help: try: `"{hello}"`
|
|
|
|
|
= note: `-D clippy::needless-raw-strings` implied by `-D warnings`
|
|
|
|
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: try
|
|
|
|
|
LL - writeln!(v, "{}", "{hello}");
|
|
LL + writeln!(v, "{{hello}}");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:11: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:12:23
|
|
|
|
|
LL | writeln!(v, "{}", '/'');
|
|
| ^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, "{}", '/'');
|
|
LL + writeln!(v, "'");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:13:23
|
|
|
|
|
LL | writeln!(v, "{}", '"');
|
|
| ^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, "{}", '"');
|
|
LL + writeln!(v, "/"");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:14:24
|
|
|
|
|
LL | writeln!(v, r"{}", '"');
|
|
| ^^^
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:15: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:19:9
|
|
|
|
|
LL | / "hello /
|
|
LL | | world!"
|
|
| |_______________^
|
|
|
|
|
help: try
|
|
|
|
|
LL ~ "some hello /
|
|
LL ~ world!"
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:26: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:26:14
|
|
|
|
|
LL | "1", "2", "3",
|
|
| ^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL ~ 2 // {}",
|
|
LL ~ "1", "3",
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:26:19
|
|
|
|
|
LL | "1", "2", "3",
|
|
| ^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL ~ {} // 3",
|
|
LL ~ "1", "2",
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:28:23
|
|
|
|
|
LL | writeln!(v, "{}", "//");
|
|
| ^^^^
|
|
|
|
|
help: try
|
|
|
|
|
LL - writeln!(v, "{}", "//");
|
|
LL + writeln!(v, "//");
|
|
|
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:29: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:30: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:31: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:32: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:33:28
|
|
|
|
|
LL | writeln!(v, r#"{}{}"#, '#', '"'); // hard mode
|
|
| ^^^
|
|
|
|
error: literal with an empty format string
|
|
--> $DIR/write_literal_2.rs:33:33
|
|
|
|
|
LL | writeln!(v, r#"{}{}"#, '#', '"'); // hard mode
|
|
| ^^^
|
|
|
|
error: aborting due to 18 previous errors
|
|
|