]>
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 | |
60c5eb7d | 19 | error: invalid format string: invalid argument name `_` |
0731742a | 20 | --> $DIR/format-string-error.rs:9:23 |
94b46f34 | 21 | | |
60c5eb7d XL |
22 | LL | let _ = format!("{_}", _ = 6usize); |
23 | | ^ invalid argument name in format string | |
94b46f34 | 24 | | |
60c5eb7d | 25 | = note: argument name cannot be a single underscore |
94b46f34 XL |
26 | |
27 | error: invalid format string: invalid argument name `_` | |
60c5eb7d | 28 | --> $DIR/format-string-error.rs:11:25 |
94b46f34 | 29 | | |
60c5eb7d XL |
30 | LL | let _ = format!("{a:_}", a = "", _ = 0); |
31 | | ^ invalid argument name in format string | |
32 | | | |
33 | = note: argument name cannot be a single underscore | |
34 | ||
35 | error: invalid format string: invalid argument name `_` | |
36 | --> $DIR/format-string-error.rs:13:26 | |
37 | | | |
38 | LL | let _ = format!("{a:._$}", a = "", _ = 0); | |
39 | | ^ invalid argument name in format string | |
94b46f34 | 40 | | |
60c5eb7d | 41 | = note: argument name cannot be a single underscore |
94b46f34 XL |
42 | |
43 | error: invalid format string: expected `'}'` but string was terminated | |
60c5eb7d | 44 | --> $DIR/format-string-error.rs:15:23 |
94b46f34 XL |
45 | | |
46 | LL | let _ = format!("{"); | |
0731742a XL |
47 | | -^ expected `'}'` in format string |
48 | | | | |
49 | | because of this opening brace | |
94b46f34 XL |
50 | | |
51 | = note: if you intended to print `{`, you can escape it using `{{` | |
52 | ||
53 | error: invalid format string: unmatched `}` found | |
60c5eb7d | 54 | --> $DIR/format-string-error.rs:17:22 |
94b46f34 XL |
55 | | |
56 | LL | let _ = format!("}"); | |
57 | | ^ unmatched `}` in format string | |
58 | | | |
59 | = note: if you intended to print `}`, you can escape it using `}}` | |
60 | ||
532ac7d7 | 61 | error: invalid format string: expected `'}'`, found `'\'` |
60c5eb7d | 62 | --> $DIR/format-string-error.rs:19:23 |
94b46f34 | 63 | | |
532ac7d7 | 64 | LL | let _ = format!("{\}"); |
0731742a XL |
65 | | -^ expected `}` in format string |
66 | | | | |
67 | | because of this opening brace | |
68 | | | |
69 | = note: if you intended to print `{`, you can escape it using `{{` | |
94b46f34 | 70 | |
8faf50e0 | 71 | error: invalid format string: expected `'}'` but string was terminated |
60c5eb7d | 72 | --> $DIR/format-string-error.rs:21:35 |
8faf50e0 | 73 | | |
532ac7d7 | 74 | LL | let _ = format!("\n\n\n{\n\n\n"); |
0731742a XL |
75 | | - ^ expected `'}'` in format string |
76 | | | | |
77 | | because of this opening brace | |
8faf50e0 XL |
78 | | |
79 | = note: if you intended to print `{`, you can escape it using `{{` | |
80 | ||
81 | error: invalid format string: expected `'}'` but string was terminated | |
60c5eb7d | 82 | --> $DIR/format-string-error.rs:27:3 |
8faf50e0 XL |
83 | | |
84 | LL | {"###); | |
0731742a XL |
85 | | -^ expected `'}'` in format string |
86 | | | | |
87 | | because of this opening brace | |
8faf50e0 XL |
88 | | |
89 | = note: if you intended to print `{`, you can escape it using `{{` | |
90 | ||
91 | error: invalid format string: expected `'}'` but string was terminated | |
60c5eb7d | 92 | --> $DIR/format-string-error.rs:35:1 |
8faf50e0 | 93 | | |
0731742a XL |
94 | LL | { |
95 | | - because of this opening brace | |
8faf50e0 | 96 | LL | |
0731742a | 97 | LL | "###); |
8faf50e0 XL |
98 | | ^ expected `'}'` in format string |
99 | | | |
100 | = note: if you intended to print `{`, you can escape it using `{{` | |
101 | ||
102 | error: invalid format string: unmatched `}` found | |
60c5eb7d | 103 | --> $DIR/format-string-error.rs:41:2 |
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: invalid format string: unmatched `}` found | |
60c5eb7d | 111 | --> $DIR/format-string-error.rs:49:9 |
8faf50e0 XL |
112 | | |
113 | LL | } | |
114 | | ^ unmatched `}` in format string | |
115 | | | |
116 | = note: if you intended to print `}`, you can escape it using `}}` | |
117 | ||
e74abb32 | 118 | error: 3 positional arguments in format string, but there are 2 arguments |
60c5eb7d | 119 | --> $DIR/format-string-error.rs:53:15 |
e74abb32 XL |
120 | | |
121 | LL | println!("{} {} {}", 1, 2); | |
122 | | ^^ ^^ ^^ - - | |
123 | ||
60c5eb7d | 124 | error: aborting due to 14 previous errors |
476ff2be | 125 |