]> git.lizzy.rs Git - rust.git/blob - tests/ui/fmt/format-string-error.stderr
Rollup merge of #105784 - yanns:update_stdarch, r=Amanieu
[rust.git] / tests / ui / fmt / format-string-error.stderr
1 error: invalid format string: expected `'}'` but string was terminated
2   --> $DIR/format-string-error.rs:4:16
3    |
4 LL |     println!("{");
5    |               -^ expected `'}'` in format string
6    |               |
7    |               because of this opening brace
8    |
9    = note: if you intended to print `{`, you can escape it using `{{`
10
11 error: invalid format string: unmatched `}` found
12   --> $DIR/format-string-error.rs:7:15
13    |
14 LL |     println!("}");
15    |               ^ unmatched `}` in format string
16    |
17    = note: if you intended to print `}`, you can escape it using `}}`
18
19 error: invalid format string: invalid argument name `_`
20   --> $DIR/format-string-error.rs:9:23
21    |
22 LL |     let _ = format!("{_}", _ = 6usize);
23    |                       ^ invalid argument name in format string
24    |
25    = note: argument name cannot be a single underscore
26
27 error: invalid format string: invalid argument name `_`
28   --> $DIR/format-string-error.rs:11:25
29    |
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
40    |
41    = note: argument name cannot be a single underscore
42
43 error: invalid format string: expected `'}'` but string was terminated
44   --> $DIR/format-string-error.rs:15:23
45    |
46 LL |     let _ = format!("{");
47    |                      -^ expected `'}'` in format string
48    |                      |
49    |                      because of this opening brace
50    |
51    = note: if you intended to print `{`, you can escape it using `{{`
52
53 error: invalid format string: unmatched `}` found
54   --> $DIR/format-string-error.rs:17:22
55    |
56 LL |     let _ = format!("}");
57    |                      ^ unmatched `}` in format string
58    |
59    = note: if you intended to print `}`, you can escape it using `}}`
60
61 error: invalid format string: expected `'}'`, found `'\'`
62   --> $DIR/format-string-error.rs:19:23
63    |
64 LL |     let _ = format!("{\}");
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 `{{`
70
71 error: invalid format string: expected `'}'` but string was terminated
72   --> $DIR/format-string-error.rs:21:35
73    |
74 LL |     let _ = format!("\n\n\n{\n\n\n");
75    |                            -      ^ expected `'}'` in format string
76    |                            |
77    |                            because of this opening brace
78    |
79    = note: if you intended to print `{`, you can escape it using `{{`
80
81 error: invalid format string: expected `'}'` but string was terminated
82   --> $DIR/format-string-error.rs:27:3
83    |
84 LL |     {"###);
85    |     -^ expected `'}'` in format string
86    |     |
87    |     because of this opening brace
88    |
89    = note: if you intended to print `{`, you can escape it using `{{`
90
91 error: invalid format string: expected `'}'` but string was terminated
92   --> $DIR/format-string-error.rs:35:1
93    |
94 LL |     {
95    |     - because of this opening brace
96 LL |
97 LL | "###);
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
103   --> $DIR/format-string-error.rs:41:2
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
111   --> $DIR/format-string-error.rs:49:9
112    |
113 LL |         }
114    |         ^ unmatched `}` in format string
115    |
116    = note: if you intended to print `}`, you can escape it using `}}`
117
118 error: 3 positional arguments in format string, but there are 2 arguments
119   --> $DIR/format-string-error.rs:53:15
120    |
121 LL |     println!("{} {} {}", 1, 2);
122    |               ^^ ^^ ^^   -  -
123
124 error: aborting due to 14 previous errors
125