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