-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:17:32
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:30:27
|
-17 | write!(&mut v, "Hello {}", "world");
- | ^^^^^^^
+LL | write!(v, "Hello {}", "world");
+ | ^^^^^^^
|
- = note: `-D write-literal` implied by `-D warnings`
-
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:18:44
+ = note: `-D clippy::write-literal` implied by `-D warnings`
+help: try this
|
-18 | writeln!(&mut v, "Hello {} {}", world, "world");
- | ^^^^^^^
+LL - write!(v, "Hello {}", "world");
+LL + write!(v, "Hello world");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:19:34
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:31:39
|
-19 | writeln!(&mut v, "Hello {}", "world");
- | ^^^^^^^
-
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:20:38
+LL | writeln!(v, "Hello {} {}", world, "world");
+ | ^^^^^^^
|
-20 | writeln!(&mut v, "10 / 4 is {}", 2.5);
- | ^^^
-
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:21:36
+help: try this
|
-21 | writeln!(&mut v, "2 + 1 = {}", 3);
- | ^
+LL - writeln!(v, "Hello {} {}", world, "world");
+LL + writeln!(v, "Hello {} world", world);
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:22:39
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:32:29
|
-22 | writeln!(&mut v, "2 + 1 = {:.4}", 3);
- | ^
-
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:23:40
+LL | writeln!(v, "Hello {}", "world");
+ | ^^^^^^^
|
-23 | writeln!(&mut v, "2 + 1 = {:5.4}", 3);
- | ^
-
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:24:41
+help: try this
|
-24 | writeln!(&mut v, "Debug test {:?}", "hello, world");
- | ^^^^^^^^^^^^^^
+LL - writeln!(v, "Hello {}", "world");
+LL + writeln!(v, "Hello world");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:29:33
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:37:28
+ |
+LL | writeln!(v, "{0} {1}", "hello", "world");
+ | ^^^^^^^
|
-29 | writeln!(&mut v, "{0} {1}", "hello", "world");
- | ^^^^^^^
+help: try this
+ |
+LL - writeln!(v, "{0} {1}", "hello", "world");
+LL + writeln!(v, "hello {1}", "world");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:29:42
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:37:37
+ |
+LL | writeln!(v, "{0} {1}", "hello", "world");
+ | ^^^^^^^
+ |
+help: try this
|
-29 | writeln!(&mut v, "{0} {1}", "hello", "world");
- | ^^^^^^^
+LL - writeln!(v, "{0} {1}", "hello", "world");
+LL + writeln!(v, "{0} world", "hello");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:30:33
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:38:28
+ |
+LL | writeln!(v, "{1} {0}", "hello", "world");
+ | ^^^^^^^
+ |
+help: try this
|
-30 | writeln!(&mut v, "{1} {0}", "hello", "world");
- | ^^^^^^^
+LL - writeln!(v, "{1} {0}", "hello", "world");
+LL + writeln!(v, "{1} hello", "world");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:30:42
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:38:37
|
-30 | writeln!(&mut v, "{1} {0}", "hello", "world");
- | ^^^^^^^
+LL | writeln!(v, "{1} {0}", "hello", "world");
+ | ^^^^^^^
+ |
+help: try this
+ |
+LL - writeln!(v, "{1} {0}", "hello", "world");
+LL + writeln!(v, "world {0}", "hello");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:33:43
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:41:32
+ |
+LL | writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
+ | ^^^^^^^^^^^^^
|
-33 | writeln!(&mut 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");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:33:58
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:41:47
+ |
+LL | writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
+ | ^^^^^^^^^^^^^
|
-33 | writeln!(&mut 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");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:34:43
+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
|
-34 | writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world");
- | ^^^^^^^
+LL - writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
+LL + writeln!(v, "{bar} hello", bar = "world");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:34:58
+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
|
-34 | writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world");
- | ^^^^^^^
+LL - writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
+LL + writeln!(v, "world {foo}", foo = "hello");
+ |
-error: aborting due to 16 previous errors
+error: aborting due to 11 previous errors