]> git.proxmox.com Git - rustc.git/blame - src/test/ui/fmt/format-string-error.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / fmt / format-string-error.stderr
CommitLineData
476ff2be 1error: invalid format string: expected `'}'` but string was terminated
0731742a 2 --> $DIR/format-string-error.rs:4:16
476ff2be 3 |
0531ce1d 4LL | 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
11error: invalid format string: unmatched `}` found
0731742a 12 --> $DIR/format-string-error.rs:7:15
476ff2be 13 |
0531ce1d 14LL | 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 19error: invalid format string: invalid argument name `_`
0731742a 20 --> $DIR/format-string-error.rs:9:23
94b46f34 21 |
60c5eb7d
XL
22LL | 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
27error: invalid format string: invalid argument name `_`
60c5eb7d 28 --> $DIR/format-string-error.rs:11:25
94b46f34 29 |
60c5eb7d
XL
30LL | let _ = format!("{a:_}", a = "", _ = 0);
31 | ^ invalid argument name in format string
32 |
33 = note: argument name cannot be a single underscore
34
35error: invalid format string: invalid argument name `_`
36 --> $DIR/format-string-error.rs:13:26
37 |
38LL | 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
43error: invalid format string: expected `'}'` but string was terminated
60c5eb7d 44 --> $DIR/format-string-error.rs:15:23
94b46f34
XL
45 |
46LL | 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
53error: invalid format string: unmatched `}` found
60c5eb7d 54 --> $DIR/format-string-error.rs:17:22
94b46f34
XL
55 |
56LL | let _ = format!("}");
57 | ^ unmatched `}` in format string
58 |
59 = note: if you intended to print `}`, you can escape it using `}}`
60
532ac7d7 61error: invalid format string: expected `'}'`, found `'\'`
60c5eb7d 62 --> $DIR/format-string-error.rs:19:23
94b46f34 63 |
532ac7d7 64LL | 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 71error: invalid format string: expected `'}'` but string was terminated
60c5eb7d 72 --> $DIR/format-string-error.rs:21:35
8faf50e0 73 |
532ac7d7 74LL | 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
81error: invalid format string: expected `'}'` but string was terminated
60c5eb7d 82 --> $DIR/format-string-error.rs:27:3
8faf50e0
XL
83 |
84LL | {"###);
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
91error: invalid format string: expected `'}'` but string was terminated
60c5eb7d 92 --> $DIR/format-string-error.rs:35:1
8faf50e0 93 |
0731742a
XL
94LL | {
95 | - because of this opening brace
8faf50e0 96LL |
0731742a 97LL | "###);
8faf50e0
XL
98 | ^ expected `'}'` in format string
99 |
100 = note: if you intended to print `{`, you can escape it using `{{`
101
102error: invalid format string: unmatched `}` found
60c5eb7d 103 --> $DIR/format-string-error.rs:41:2
8faf50e0
XL
104 |
105LL | }
106 | ^ unmatched `}` in format string
107 |
108 = note: if you intended to print `}`, you can escape it using `}}`
109
110error: invalid format string: unmatched `}` found
60c5eb7d 111 --> $DIR/format-string-error.rs:49:9
8faf50e0
XL
112 |
113LL | }
114 | ^ unmatched `}` in format string
115 |
116 = note: if you intended to print `}`, you can escape it using `}}`
117
e74abb32 118error: 3 positional arguments in format string, but there are 2 arguments
60c5eb7d 119 --> $DIR/format-string-error.rs:53:15
e74abb32
XL
120 |
121LL | println!("{} {} {}", 1, 2);
122 | ^^ ^^ ^^ - -
123
60c5eb7d 124error: aborting due to 14 previous errors
476ff2be 125