111 lines
3.6 KiB
Text
111 lines
3.6 KiB
Text
error: invalid format string: expected `'}'` but string was terminated
|
|
--> $DIR/format-string-error.rs:4:16
|
|
|
|
|
LL | println!("{");
|
|
| -^ 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/format-string-error.rs:7:15
|
|
|
|
|
LL | println!("}");
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
error: invalid format string: invalid argument name `_foo`
|
|
--> $DIR/format-string-error.rs:9:23
|
|
|
|
|
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 `_`
|
|
--> $DIR/format-string-error.rs:11:23
|
|
|
|
|
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
|
|
--> $DIR/format-string-error.rs:13:23
|
|
|
|
|
LL | let _ = 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/format-string-error.rs:15:22
|
|
|
|
|
LL | let _ = format!("}");
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
error: invalid format string: expected `'}'`, found `'\'`
|
|
--> $DIR/format-string-error.rs:17:23
|
|
|
|
|
LL | let _ = 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: expected `'}'` but string was terminated
|
|
--> $DIR/format-string-error.rs:19:35
|
|
|
|
|
LL | let _ = format!("\n\n\n{\n\n\n");
|
|
| - ^ expected `'}'` in format string
|
|
| |
|
|
| because of this opening brace
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
|
--> $DIR/format-string-error.rs:25:3
|
|
|
|
|
LL | {"###);
|
|
| -^ expected `'}'` in format string
|
|
| |
|
|
| because of this opening brace
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
error: invalid format string: expected `'}'` but string was terminated
|
|
--> $DIR/format-string-error.rs:33:1
|
|
|
|
|
LL | {
|
|
| - because of this opening brace
|
|
LL |
|
|
LL | "###);
|
|
| ^ expected `'}'` in format string
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
error: invalid format string: unmatched `}` found
|
|
--> $DIR/format-string-error.rs:39:2
|
|
|
|
|
LL | }
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
error: invalid format string: unmatched `}` found
|
|
--> $DIR/format-string-error.rs:47:9
|
|
|
|
|
LL | }
|
|
| ^ unmatched `}` in format string
|
|
|
|
|
= note: if you intended to print `}`, you can escape it using `}}`
|
|
|
|
error: aborting due to 12 previous errors
|
|
|