2018-04-01 20:28:07 +02:00
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:23:71
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
23 | println!("{} of {:b} people know binary, the other half doesn't", 1, 2);
|
|
|
|
| ^
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
|
|
|
= note: `-D print-literal` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:24:24
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
24 | print!("Hello {}", "world");
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
|
|
|
--> $DIR/print_literal.rs:25:36
|
|
|
|
|
|
|
|
|
25 | println!("Hello {} {}", world, "world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:26:26
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
26 | println!("Hello {}", "world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:27:30
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
27 | println!("10 / 4 is {}", 2.5);
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:28:28
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
28 | println!("2 + 1 = {}", 3);
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:33:25
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
33 | println!("{0} {1}", "hello", "world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:33:34
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
33 | println!("{0} {1}", "hello", "world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:34:25
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
34 | println!("{1} {0}", "hello", "world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:34:34
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
34 | println!("{1} {0}", "hello", "world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:37:33
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
37 | println!("{foo} {bar}", foo="hello", bar="world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:37:46
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
37 | println!("{foo} {bar}", foo="hello", bar="world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:38:33
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
38 | println!("{bar} {foo}", foo="hello", bar="world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: printing a literal with an empty format string
|
2018-04-21 20:50:49 +02:00
|
|
|
--> $DIR/print_literal.rs:38:46
|
2018-04-01 20:28:07 +02:00
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
38 | println!("{bar} {foo}", foo="hello", bar="world");
|
2018-04-01 20:28:07 +02:00
|
|
|
| ^^^^^^^
|
|
|
|
|
2018-04-21 20:50:49 +02:00
|
|
|
error: aborting due to 14 previous errors
|
2018-04-01 20:28:07 +02:00
|
|
|
|