2016-11-10 12:48:55 -08:00
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:4:16
|
2016-11-10 12:48:55 -08:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | println!("{");
|
2018-12-20 22:33:16 -08:00
|
|
|
| -^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2016-11-10 12:48:55 -08:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:7:15
|
2016-11-10 12:48:55 -08:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | println!("}");
|
2018-07-14 20:50:30 -07:00
|
|
|
| ^ unmatched `}` in format string
|
2016-11-10 12:48:55 -08:00
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
2018-05-10 09:09:58 -07:00
|
|
|
error: invalid format string: invalid argument name `_foo`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:9:23
|
2018-05-10 09:09:58 -07:00
|
|
|
|
|
|
|
|
LL | let _ = format!("{_foo}", _foo = 6usize);
|
|
|
|
| ^^^^ invalid argument name in format string
|
|
|
|
|
|
|
|
|
= note: argument names cannot start with an underscore
|
|
|
|
|
|
|
|
error: invalid format string: invalid argument name `_`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:11:23
|
2018-05-10 09:09:58 -07:00
|
|
|
|
|
|
|
|
LL | let _ = format!("{_}", _ = 6usize);
|
|
|
|
| ^ invalid argument name in format string
|
|
|
|
|
|
|
|
|
= note: argument names cannot start with an underscore
|
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:13:23
|
2018-05-10 09:09:58 -07:00
|
|
|
|
|
|
|
|
LL | let _ = format!("{");
|
2018-12-20 22:33:16 -08:00
|
|
|
| -^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2018-05-10 09:09:58 -07:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:15:22
|
2018-05-10 09:09:58 -07:00
|
|
|
|
|
|
|
|
LL | let _ = format!("}");
|
|
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
2019-03-13 00:47:36 -04:00
|
|
|
error: invalid format string: expected `'}'`, found `'\'`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:17:23
|
2018-05-10 09:09:58 -07:00
|
|
|
|
|
2019-03-13 00:47:36 -04:00
|
|
|
LL | let _ = format!("{\}");
|
2018-12-20 22:33:16 -08:00
|
|
|
| -^ expected `}` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
2018-05-10 09:09:58 -07:00
|
|
|
|
2018-07-19 23:14:00 -07:00
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2018-12-20 22:33:16 -08:00
|
|
|
--> $DIR/format-string-error.rs:19:35
|
2018-07-19 23:14:00 -07:00
|
|
|
|
|
2019-03-13 00:47:36 -04:00
|
|
|
LL | let _ = format!("\n\n\n{\n\n\n");
|
2018-12-20 22:33:16 -08:00
|
|
|
| - ^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2018-07-19 23:14:00 -07:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:25:3
|
2018-07-19 23:14:00 -07:00
|
|
|
|
|
|
|
|
LL | {"###);
|
2018-12-20 22:33:16 -08:00
|
|
|
| -^ expected `'}'` in format string
|
|
|
|
| |
|
|
|
|
| because of this opening brace
|
2018-07-19 23:14:00 -07:00
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2018-12-20 22:33:16 -08:00
|
|
|
--> $DIR/format-string-error.rs:33:1
|
2018-07-19 23:14:00 -07:00
|
|
|
|
|
2018-12-20 22:33:16 -08:00
|
|
|
LL | {
|
|
|
|
| - because of this opening brace
|
2018-07-19 23:14:00 -07:00
|
|
|
LL |
|
2018-12-20 22:33:16 -08:00
|
|
|
LL | "###);
|
2018-07-19 23:14:00 -07:00
|
|
|
| ^ expected `'}'` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:39:2
|
2018-07-19 23:14:00 -07:00
|
|
|
|
|
|
|
|
LL | }
|
|
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/format-string-error.rs:47:9
|
2018-07-19 23:14:00 -07:00
|
|
|
|
|
|
|
|
LL | }
|
|
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
|
|
|
|
error: aborting due to 12 previous errors
|
2016-11-10 12:48:55 -08:00
|
|
|
|