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