rust/tests/ui/write_literal_2.stderr

202 lines
4.0 KiB
Plaintext
Raw Normal View History

error: unnecessary raw string literal
--> $DIR/write_literal_2.rs:13: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
2023-07-27 06:40:22 -05:00
--> $DIR/write_literal_2.rs:10:23
|
LL | writeln!(v, "{}", "{hello}");
| ^^^^^^^^^
|
= note: `-D clippy::write-literal` implied by `-D warnings`
2023-07-01 06:08:01 -05:00
help: try
|
LL - writeln!(v, "{}", "{hello}");
LL + writeln!(v, "{{hello}}");
2022-06-15 06:15:54 -05:00
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:13:24
|
LL | writeln!(v, r"{}", r"{hello}");
| ^^^^^^^^^^
|
2023-07-01 06:08:01 -05:00
help: try
|
LL - writeln!(v, r"{}", r"{hello}");
LL + writeln!(v, r"{{hello}}");
2022-06-15 06:15:54 -05:00
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:17:23
|
LL | writeln!(v, "{}", '\'');
| ^^^^
|
2023-07-01 06:08:01 -05:00
help: try
|
LL - writeln!(v, "{}", '\'');
LL + writeln!(v, "'");
2022-06-15 06:15:54 -05:00
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:19:23
|
LL | writeln!(v, "{}", '"');
| ^^^
|
2023-07-01 06:08:01 -05:00
help: try
|
LL - writeln!(v, "{}", '"');
LL + writeln!(v, "\"");
2022-06-15 06:15:54 -05:00
|
2022-08-30 07:20:49 -05:00
error: literal with an empty format string
--> $DIR/write_literal_2.rs:21:24
2022-08-30 07:20:49 -05:00
|
LL | writeln!(v, r"{}", '"');
| ^^^
error: literal with an empty format string
--> $DIR/write_literal_2.rs:23:24
|
LL | writeln!(v, r"{}", '\'');
| ^^^^
|
2023-07-01 06:08:01 -05:00
help: try
|
LL - writeln!(v, r"{}", '\'');
LL + writeln!(v, r"'");
2022-06-15 06:15:54 -05:00
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:28:9
|
LL | / "hello \
LL | |
LL | | world!"
| |_______________^
|
2023-07-01 06:08:01 -05:00
help: try
|
LL ~ "some hello \
LL +
2021-08-11 09:21:33 -05:00
LL ~ world!"
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:36:9
|
LL | "1",
| ^^^
|
2023-07-01 06:08:01 -05:00
help: try
|
LL ~ "some 1\
LL ~ {} \\ {}",
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:37:9
|
LL | "2",
| ^^^
|
2023-07-01 06:08:01 -05:00
help: try
|
LL ~ 2 \\ {}",
LL ~ "1",
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:38:9
|
LL | "3",
| ^^^
|
2023-07-01 06:08:01 -05:00
help: try
|
LL ~ {} \\ 3",
LL | "1",
LL ~ "2",
|
2022-08-30 07:20:49 -05:00
error: literal with an empty format string
--> $DIR/write_literal_2.rs:41:23
2022-08-30 07:20:49 -05:00
|
LL | writeln!(v, "{}", "\\");
2022-08-30 07:20:49 -05:00
| ^^^^
|
2023-07-01 06:08:01 -05:00
help: try
2022-08-30 07:20:49 -05:00
|
LL - writeln!(v, "{}", "\\");
LL + writeln!(v, "\\");
2022-08-30 07:20:49 -05:00
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:43:24
2022-08-30 07:20:49 -05:00
|
LL | writeln!(v, r"{}", "\\");
2022-08-30 07:20:49 -05:00
| ^^^^
|
2023-07-01 06:08:01 -05:00
help: try
2022-08-30 07:20:49 -05:00
|
LL - writeln!(v, r"{}", "\\");
LL + writeln!(v, r"\");
2022-08-30 07:20:49 -05:00
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:45:26
2022-08-30 07:20:49 -05:00
|
LL | writeln!(v, r#"{}"#, "\\");
2022-08-30 07:20:49 -05:00
| ^^^^
|
2023-07-01 06:08:01 -05:00
help: try
2022-08-30 07:20:49 -05:00
|
LL - writeln!(v, r#"{}"#, "\\");
LL + writeln!(v, r#"\"#);
2022-08-30 07:20:49 -05:00
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:47:23
2022-08-30 07:20:49 -05:00
|
LL | writeln!(v, "{}", r"\");
2022-08-30 07:20:49 -05:00
| ^^^^
|
2023-07-01 06:08:01 -05:00
help: try
2022-08-30 07:20:49 -05:00
|
LL - writeln!(v, "{}", r"\");
LL + writeln!(v, "\\");
2022-08-30 07:20:49 -05:00
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:49:23
2022-08-30 07:20:49 -05:00
|
LL | writeln!(v, "{}", "\r");
2022-08-30 07:20:49 -05:00
| ^^^^
|
2023-07-01 06:08:01 -05:00
help: try
2022-08-30 07:20:49 -05:00
|
LL - writeln!(v, "{}", "\r");
LL + writeln!(v, "\r");
2022-08-30 07:20:49 -05:00
|
error: literal with an empty format string
--> $DIR/write_literal_2.rs:52:28
2022-08-30 07:20:49 -05:00
|
LL | writeln!(v, r#"{}{}"#, '#', '"');
2022-08-30 07:20:49 -05:00
| ^^^
error: literal with an empty format string
--> $DIR/write_literal_2.rs:52:33
2022-08-30 07:20:49 -05:00
|
LL | writeln!(v, r#"{}{}"#, '#', '"');
2022-08-30 07:20:49 -05:00
| ^^^
error: aborting due to 18 previous errors