-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:26:79
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:30:27
|
-26 | writeln!(&mut v, "{} of {:b} people know binary, the other half doesn't", 1, 2);
- | ^
+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:27:32
+ = note: `-D clippy::write-literal` implied by `-D warnings`
+help: try this
|
-27 | write!(&mut v, "Hello {}", "world");
- | ^^^^^^^
+LL - write!(v, "Hello {}", "world");
+LL + write!(v, "Hello world");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:28:44
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:31:39
|
-28 | writeln!(&mut v, "Hello {} {}", world, "world");
- | ^^^^^^^
-
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:29:34
+LL | writeln!(v, "Hello {} {}", world, "world");
+ | ^^^^^^^
|
-29 | writeln!(&mut v, "Hello {}", "world");
- | ^^^^^^^
-
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:30:38
+help: try this
|
-30 | writeln!(&mut v, "10 / 4 is {}", 2.5);
- | ^^^
+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:31:36
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:32:29
|
-31 | writeln!(&mut v, "2 + 1 = {}", 3);
- | ^
+LL | writeln!(v, "Hello {}", "world");
+ | ^^^^^^^
+ |
+help: try this
+ |
+LL - writeln!(v, "Hello {}", "world");
+LL + writeln!(v, "Hello world");
+ |
-error: writing a literal with an empty format string
- --> $DIR/write_literal.rs:36:33
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:37:28
+ |
+LL | writeln!(v, "{0} {1}", "hello", "world");
+ | ^^^^^^^
|
-36 | 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:36:42
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:37:37
+ |
+LL | writeln!(v, "{0} {1}", "hello", "world");
+ | ^^^^^^^
+ |
+help: try this
|
-36 | 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:37:33
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:38:28
+ |
+LL | writeln!(v, "{1} {0}", "hello", "world");
+ | ^^^^^^^
+ |
+help: try this
|
-37 | 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:37:42
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:38:37
|
-37 | 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:40:41
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:41:32
+ |
+LL | writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
+ | ^^^^^^^^^^^^^
|
-40 | 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:40:54
+error: literal with an empty format string
+ --> $DIR/write_literal.rs:41:47
+ |
+LL | writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
+ | ^^^^^^^^^^^^^
|
-40 | 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:41:41
+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
|
-41 | 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:41:54
+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
|
-41 | 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 14 previous errors
+error: aborting due to 11 previous errors