rust/tests/ui/write_literal.stderr

136 lines
3.5 KiB
Plaintext
Raw Normal View History

error: literal with an empty format string
--> $DIR/write_literal.rs:30:27
|
LL | write!(v, "Hello {}", "world");
| ^^^^^^^
|
= note: `-D clippy::write-literal` implied by `-D warnings`
help: try this
|
LL - write!(v, "Hello {}", "world");
LL + write!(v, "Hello world");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:31:39
|
LL | writeln!(v, "Hello {} {}", world, "world");
| ^^^^^^^
|
help: try this
|
LL - writeln!(v, "Hello {} {}", world, "world");
LL + writeln!(v, "Hello {} world", world);
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:32:29
|
LL | writeln!(v, "Hello {}", "world");
| ^^^^^^^
|
help: try this
|
LL - writeln!(v, "Hello {}", "world");
LL + writeln!(v, "Hello world");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:37:28
|
LL | writeln!(v, "{0} {1}", "hello", "world");
| ^^^^^^^
|
help: try this
|
LL - writeln!(v, "{0} {1}", "hello", "world");
LL + writeln!(v, "hello {1}", "world");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:37:37
|
LL | writeln!(v, "{0} {1}", "hello", "world");
| ^^^^^^^
|
help: try this
|
LL - writeln!(v, "{0} {1}", "hello", "world");
LL + writeln!(v, "{0} world", "hello");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:38:28
|
LL | writeln!(v, "{1} {0}", "hello", "world");
| ^^^^^^^
|
help: try this
|
LL - writeln!(v, "{1} {0}", "hello", "world");
LL + writeln!(v, "{1} hello", "world");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:38:37
|
LL | writeln!(v, "{1} {0}", "hello", "world");
| ^^^^^^^
|
help: try this
|
LL - writeln!(v, "{1} {0}", "hello", "world");
LL + writeln!(v, "world {0}", "hello");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:41:32
|
LL | writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
| ^^^^^^^^^^^^^
|
help: try this
|
LL - writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
LL + writeln!(v, "hello {bar}", bar = "world");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:41:47
|
LL | writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
| ^^^^^^^^^^^^^
|
help: try this
|
LL - writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
LL + writeln!(v, "{foo} world", foo = "hello");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:42:32
|
LL | writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
| ^^^^^^^^^^^^^
|
help: try this
|
LL - writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
LL + writeln!(v, "{bar} hello", bar = "world");
2022-06-15 11:15:54 +00:00
|
error: literal with an empty format string
--> $DIR/write_literal.rs:42:47
|
LL | writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
| ^^^^^^^^^^^^^
|
help: try this
|
LL - writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
LL + writeln!(v, "world {foo}", foo = "hello");
2022-06-15 11:15:54 +00:00
|
error: aborting due to 11 previous errors