2018-07-23 05:40:24 +00:00
|
|
|
error: 1 positional argument in format string, but no arguments were given
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:6:14
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{}");
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: invalid reference to positional argument 1 (there is 1 argument)
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:9:14
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{1}", 1);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
= note: positional arguments are zero-based
|
|
|
|
|
|
|
|
error: argument never used
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:9:20
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{1}", 1);
|
2018-07-25 03:46:22 +00:00
|
|
|
| ----- ^
|
|
|
|
| |
|
|
|
|
| formatting specifier missing
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: 2 positional arguments in format string, but no arguments were given
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:13:14
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{} {}");
|
|
|
|
| ^^ ^^
|
|
|
|
|
|
|
|
error: invalid reference to positional argument 1 (there is 1 argument)
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:16:18
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{0} {1}", 1);
|
2018-07-23 22:09:00 +00:00
|
|
|
| ^^^
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
= note: positional arguments are zero-based
|
|
|
|
|
|
|
|
error: invalid reference to positional argument 2 (there are 2 arguments)
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:19:22
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{0} {1} {2}", 1, 2);
|
2018-07-23 22:09:00 +00:00
|
|
|
| ^^^
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
= note: positional arguments are zero-based
|
|
|
|
|
|
|
|
error: invalid reference to positional argument 2 (there are 2 arguments)
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:22:28
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{} {value} {} {}", 1, value=2);
|
2018-07-23 22:09:00 +00:00
|
|
|
| ^^
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
= note: positional arguments are zero-based
|
|
|
|
|
|
|
|
error: invalid reference to positional arguments 3, 4 and 5 (there are 3 arguments)
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:24:38
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{name} {value} {} {} {} {} {} {}", 0, name=1, value=2);
|
2018-07-23 22:09:00 +00:00
|
|
|
| ^^ ^^ ^^
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
= note: positional arguments are zero-based
|
|
|
|
|
|
|
|
error: there is no argument named `foo`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:27:17
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
|
2018-07-23 07:01:17 +00:00
|
|
|
| ^^^^^
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: there is no argument named `bar`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:27:26
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
|
2018-07-23 07:01:17 +00:00
|
|
|
| ^^^^^
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: there is no argument named `foo`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:31:14
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{foo}"); //~ ERROR: no argument named `foo`
|
2018-07-23 07:01:17 +00:00
|
|
|
| ^^^^^
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: multiple unused formatting arguments
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:32:17
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("", 1, 2); //~ ERROR: multiple unused formatting arguments
|
|
|
|
| -- ^ ^
|
|
|
|
| |
|
2018-07-24 16:51:04 +00:00
|
|
|
| multiple missing formatting specifiers
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: argument never used
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:33:22
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{}", 1, 2); //~ ERROR: argument never used
|
2018-07-25 03:46:22 +00:00
|
|
|
| ---- ^
|
|
|
|
| |
|
|
|
|
| formatting specifier missing
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: argument never used
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:34:20
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{1}", 1, 2); //~ ERROR: argument never used
|
2018-07-25 03:46:22 +00:00
|
|
|
| ----- ^
|
|
|
|
| |
|
|
|
|
| formatting specifier missing
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: named argument never used
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:35:26
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{}", 1, foo=2); //~ ERROR: named argument never used
|
2018-07-25 03:46:22 +00:00
|
|
|
| ---- ^
|
|
|
|
| |
|
|
|
|
| formatting specifier missing
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: argument never used
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:36:22
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{foo}", 1, foo=2); //~ ERROR: argument never used
|
2018-07-25 03:46:22 +00:00
|
|
|
| ------- ^
|
|
|
|
| |
|
|
|
|
| formatting specifier missing
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: named argument never used
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:37:21
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("", foo=2); //~ ERROR: named argument never used
|
2018-07-25 03:46:22 +00:00
|
|
|
| -- ^
|
|
|
|
| |
|
|
|
|
| formatting specifier missing
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: multiple unused formatting arguments
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:38:32
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{} {}", 1, 2, foo=1, bar=2); //~ ERROR: multiple unused formatting arguments
|
|
|
|
| ------- ^ ^
|
|
|
|
| |
|
2018-07-24 16:51:04 +00:00
|
|
|
| multiple missing formatting specifiers
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: duplicate argument named `foo`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:40:33
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{foo}", foo=1, foo=2); //~ ERROR: duplicate argument
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: previously here
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:40:26
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{foo}", foo=1, foo=2); //~ ERROR: duplicate argument
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: expected ident, positional arguments cannot follow named arguments
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:41:24
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("", foo=1, 2); //~ ERROR: positional arguments cannot follow
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: there is no argument named `valueb`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:45:23
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
|
2018-07-23 07:01:17 +00:00
|
|
|
| ^^^^^^^^
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: named argument never used
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:45:51
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
|
2018-07-25 03:46:22 +00:00
|
|
|
| ------------------- ^
|
|
|
|
| |
|
|
|
|
| formatting specifier missing
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:51:15
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("{"); //~ ERROR: expected `'}'` but string was terminated
|
|
|
|
| ^ expected `'}'` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:53:18
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("foo } bar"); //~ ERROR: unmatched `}` found
|
|
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:54:18
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("foo }"); //~ ERROR: unmatched `}` found
|
|
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
|
|
|
error: argument never used
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:56:27
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
LL | format!("foo %s baz", "bar"); //~ ERROR: argument never used
|
2018-07-24 23:01:38 +00:00
|
|
|
| -- ^^^^^
|
|
|
|
| |
|
2018-07-25 03:46:22 +00:00
|
|
|
| help: format specifiers use curly braces: `{}`
|
2018-07-23 05:40:24 +00:00
|
|
|
|
|
|
|
|
= note: printf formatting not supported; see the documentation for `std::fmt`
|
|
|
|
|
2018-07-23 22:43:34 +00:00
|
|
|
error: there is no argument named `foo`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:60:9
|
2018-07-23 22:43:34 +00:00
|
|
|
|
|
|
|
|
LL | {foo}
|
|
|
|
| ^^^^^
|
|
|
|
|
2018-10-03 18:29:02 +00:00
|
|
|
error: invalid format string: expected `'}'`, found `'t'`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/ifmt-bad-arg.rs:75:1
|
2018-10-03 18:29:02 +00:00
|
|
|
|
|
|
|
|
LL | tenth number: {}",
|
|
|
|
| ^ expected `}` in format string
|
|
|
|
|
|
|
|
error: aborting due to 28 previous errors
|
2018-07-23 05:40:24 +00:00
|
|
|
|