2016-11-10 12:48:55 -08:00
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
2018-07-14 20:50:30 -07:00
|
|
|
--> $DIR/format-string-error.rs:12:16
|
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
|
|
|
| ^ expected `'}'` in format string
|
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-07-14 20:50:30 -07:00
|
|
|
--> $DIR/format-string-error.rs:15: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-07-14 20:50:30 -07:00
|
|
|
--> $DIR/format-string-error.rs:17: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-07-14 20:50:30 -07:00
|
|
|
--> $DIR/format-string-error.rs:19: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-07-14 20:50:30 -07:00
|
|
|
--> $DIR/format-string-error.rs:21:23
|
2018-05-10 09:09:58 -07:00
|
|
|
|
|
|
|
|
LL | let _ = format!("{");
|
|
|
|
| ^ expected `'}'` in format string
|
|
|
|
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
|
|
|
|
error: invalid format string: unmatched `}` found
|
2018-07-14 20:50:30 -07:00
|
|
|
--> $DIR/format-string-error.rs:23: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 `}}`
|
|
|
|
|
|
|
|
error: invalid format string: expected `'}'`, found `'/'`
|
2018-07-14 20:50:30 -07:00
|
|
|
--> $DIR/format-string-error.rs:25:23
|
2018-05-10 09:09:58 -07:00
|
|
|
|
|
|
|
|
LL | let _ = format!("{/}");
|
|
|
|
| ^ expected `}` in format string
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
2016-11-10 12:48:55 -08:00
|
|
|
|