]>
Commit | Line | Data |
---|---|---|
476ff2be | 1 | error: invalid format string: expected `'}'` but string was terminated |
0731742a | 2 | --> $DIR/format-string-error.rs:4:16 |
476ff2be | 3 | | |
0531ce1d | 4 | LL | println!("{"); |
0731742a XL |
5 | | -^ expected `'}'` in format string |
6 | | | | |
7 | | because of this opening brace | |
476ff2be SL |
8 | | |
9 | = note: if you intended to print `{`, you can escape it using `{{` | |
476ff2be SL |
10 | |
11 | error: invalid format string: unmatched `}` found | |
0731742a | 12 | --> $DIR/format-string-error.rs:7:15 |
476ff2be | 13 | | |
0531ce1d | 14 | LL | println!("}"); |
8faf50e0 | 15 | | ^ unmatched `}` in format string |
476ff2be SL |
16 | | |
17 | = note: if you intended to print `}`, you can escape it using `}}` | |
476ff2be | 18 | |
94b46f34 | 19 | error: invalid format string: invalid argument name `_foo` |
0731742a | 20 | --> $DIR/format-string-error.rs:9:23 |
94b46f34 XL |
21 | | |
22 | LL | let _ = format!("{_foo}", _foo = 6usize); | |
23 | | ^^^^ invalid argument name in format string | |
24 | | | |
25 | = note: argument names cannot start with an underscore | |
26 | ||
27 | error: invalid format string: invalid argument name `_` | |
0731742a | 28 | --> $DIR/format-string-error.rs:11:23 |
94b46f34 XL |
29 | | |
30 | LL | let _ = format!("{_}", _ = 6usize); | |
31 | | ^ invalid argument name in format string | |
32 | | | |
33 | = note: argument names cannot start with an underscore | |
34 | ||
35 | error: invalid format string: expected `'}'` but string was terminated | |
0731742a | 36 | --> $DIR/format-string-error.rs:13:23 |
94b46f34 XL |
37 | | |
38 | LL | let _ = format!("{"); | |
0731742a XL |
39 | | -^ expected `'}'` in format string |
40 | | | | |
41 | | because of this opening brace | |
94b46f34 XL |
42 | | |
43 | = note: if you intended to print `{`, you can escape it using `{{` | |
44 | ||
45 | error: invalid format string: unmatched `}` found | |
0731742a | 46 | --> $DIR/format-string-error.rs:15:22 |
94b46f34 XL |
47 | | |
48 | LL | let _ = format!("}"); | |
49 | | ^ unmatched `}` in format string | |
50 | | | |
51 | = note: if you intended to print `}`, you can escape it using `}}` | |
52 | ||
532ac7d7 | 53 | error: invalid format string: expected `'}'`, found `'\'` |
0731742a | 54 | --> $DIR/format-string-error.rs:17:23 |
94b46f34 | 55 | | |
532ac7d7 | 56 | LL | let _ = format!("{\}"); |
0731742a XL |
57 | | -^ expected `}` in format string |
58 | | | | |
59 | | because of this opening brace | |
60 | | | |
61 | = note: if you intended to print `{`, you can escape it using `{{` | |
94b46f34 | 62 | |
8faf50e0 | 63 | error: invalid format string: expected `'}'` but string was terminated |
0731742a | 64 | --> $DIR/format-string-error.rs:19:35 |
8faf50e0 | 65 | | |
532ac7d7 | 66 | LL | let _ = format!("\n\n\n{\n\n\n"); |
0731742a XL |
67 | | - ^ expected `'}'` in format string |
68 | | | | |
69 | | because of this opening brace | |
8faf50e0 XL |
70 | | |
71 | = note: if you intended to print `{`, you can escape it using `{{` | |
72 | ||
73 | error: invalid format string: expected `'}'` but string was terminated | |
0731742a | 74 | --> $DIR/format-string-error.rs:25:3 |
8faf50e0 XL |
75 | | |
76 | LL | {"###); | |
0731742a XL |
77 | | -^ expected `'}'` in format string |
78 | | | | |
79 | | because of this opening brace | |
8faf50e0 XL |
80 | | |
81 | = note: if you intended to print `{`, you can escape it using `{{` | |
82 | ||
83 | error: invalid format string: expected `'}'` but string was terminated | |
0731742a | 84 | --> $DIR/format-string-error.rs:33:1 |
8faf50e0 | 85 | | |
0731742a XL |
86 | LL | { |
87 | | - because of this opening brace | |
8faf50e0 | 88 | LL | |
0731742a | 89 | LL | "###); |
8faf50e0 XL |
90 | | ^ expected `'}'` in format string |
91 | | | |
92 | = note: if you intended to print `{`, you can escape it using `{{` | |
93 | ||
94 | error: invalid format string: unmatched `}` found | |
0731742a | 95 | --> $DIR/format-string-error.rs:39:2 |
8faf50e0 XL |
96 | | |
97 | LL | } | |
98 | | ^ unmatched `}` in format string | |
99 | | | |
100 | = note: if you intended to print `}`, you can escape it using `}}` | |
101 | ||
102 | error: invalid format string: unmatched `}` found | |
0731742a | 103 | --> $DIR/format-string-error.rs:47:9 |
8faf50e0 XL |
104 | | |
105 | LL | } | |
106 | | ^ unmatched `}` in format string | |
107 | | | |
108 | = note: if you intended to print `}`, you can escape it using `}}` | |
109 | ||
110 | error: aborting due to 12 previous errors | |
476ff2be | 111 |