2016-11-10 14:48:55 -06:00
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/format-string-error.rs:4:16
|
2016-11-10 14:48:55 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | println!("{");
|
2018-12-21 00:33:16 -06:00
|
|
|
| -^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2016-11-10 14:48:55 -06:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/format-string-error.rs:7:15
|
2016-11-10 14:48:55 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | println!("}");
|
2018-07-14 22:50:30 -05:00
|
|
|
| ^ unmatched `}` in format string
|
2016-11-10 14:48:55 -06:00
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
2019-11-28 12:49:13 -06:00
|
|
|
error: invalid format string: invalid argument name `_`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/format-string-error.rs:9:23
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
2019-11-28 12:49:13 -06:00
|
|
|
LL | let _ = format!("{_}", _ = 6usize);
|
|
|
|
| ^ invalid argument name in format string
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
2019-11-28 12:49:13 -06:00
|
|
|
= note: argument name cannot be a single underscore
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
|
|
error: invalid format string: invalid argument name `_`
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:11:25
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
2019-11-28 12:49:13 -06:00
|
|
|
LL | let _ = format!("{a:_}", a = "", _ = 0);
|
|
|
|
| ^ invalid argument name in format string
|
|
|
|
|
|
|
|
|
= note: argument name cannot be a single underscore
|
|
|
|
|
|
|
|
error: invalid format string: invalid argument name `_`
|
|
|
|
--> $DIR/format-string-error.rs:13:26
|
|
|
|
|
|
|
|
|
LL | let _ = format!("{a:._$}", a = "", _ = 0);
|
|
|
|
| ^ invalid argument name in format string
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
2019-11-28 12:49:13 -06:00
|
|
|
= note: argument name cannot be a single underscore
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:15:23
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
|
|
|
LL | let _ = format!("{");
|
2018-12-21 00:33:16 -06:00
|
|
|
| -^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:17:22
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
|
|
|
LL | let _ = format!("}");
|
|
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
2019-03-12 23:47:36 -05:00
|
|
|
error: invalid format string: expected `'}'`, found `'\'`
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:19:23
|
2018-05-10 11:09:58 -05:00
|
|
|
|
|
2019-03-12 23:47:36 -05:00
|
|
|
LL | let _ = format!("{\}");
|
2023-07-16 19:32:13 -05:00
|
|
|
| -^ expected `'}'` in format string
|
2018-12-21 00:33:16 -06:00
|
|
|
| |
|
|
|
|
| because of this opening brace
|
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
2018-05-10 11:09:58 -05:00
|
|
|
|
2018-07-20 01:14:00 -05:00
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:21:35
|
2018-07-20 01:14:00 -05:00
|
|
|
|
|
2019-03-12 23:47:36 -05:00
|
|
|
LL | let _ = format!("\n\n\n{\n\n\n");
|
2018-12-21 00:33:16 -06:00
|
|
|
| - ^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2018-07-20 01:14:00 -05:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:27:3
|
2018-07-20 01:14:00 -05:00
|
|
|
|
|
|
|
|
LL | {"###);
|
2018-12-21 00:33:16 -06:00
|
|
|
| -^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2018-07-20 01:14:00 -05:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:35:1
|
2018-07-20 01:14:00 -05:00
|
|
|
|
|
2018-12-21 00:33:16 -06:00
|
|
|
LL | {
|
|
|
|
| - because of this opening brace
|
2022-06-08 13:07:59 -05:00
|
|
|
LL |
|
2018-12-21 00:33:16 -06:00
|
|
|
LL | "###);
|
2018-07-20 01:14:00 -05:00
|
|
|
| ^ expected `'}'` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:41:2
|
2018-07-20 01:14:00 -05:00
|
|
|
|
|
|
|
|
LL | }
|
|
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:49:9
|
2018-07-20 01:14:00 -05:00
|
|
|
|
|
|
|
|
LL | }
|
|
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
2019-10-23 19:32:33 -05:00
|
|
|
error: 3 positional arguments in format string, but there are 2 arguments
|
2019-11-28 12:49:13 -06:00
|
|
|
--> $DIR/format-string-error.rs:53:15
|
2019-10-23 19:32:33 -05:00
|
|
|
|
|
|
|
|
LL | println!("{} {} {}", 1, 2);
|
|
|
|
| ^^ ^^ ^^ - -
|
|
|
|
|
2019-11-28 12:49:13 -06:00
|
|
|
error: aborting due to 14 previous errors
|
2016-11-10 14:48:55 -06:00
|
|
|
|