fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
4.0 KiB125 linesraw
1error: invalid format string: expected `'}'` but string was terminated
2  --> $DIR/format-string-error.rs:4:16
3   |
4LL |     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
11error: invalid format string: unmatched `}` found
12  --> $DIR/format-string-error.rs:7:15
13   |
14LL |     println!("}");
15   |               ^ unmatched `}` in format string
16   |
17   = note: if you intended to print `}`, you can escape it using `}}`
18
19error: invalid format string: invalid argument name `_`
20  --> $DIR/format-string-error.rs:9:23
21   |
22LL |     let _ = format!("{_}", _ = 6usize);
23   |                       ^ invalid argument name in format string
24   |
25   = note: argument name cannot be a single underscore
26
27error: invalid format string: invalid argument name `_`
28  --> $DIR/format-string-error.rs:11:25
29   |
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
40   |
41   = note: argument name cannot be a single underscore
42
43error: invalid format string: expected `'}'` but string was terminated
44  --> $DIR/format-string-error.rs:15:23
45   |
46LL |     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
53error: invalid format string: unmatched `}` found
54  --> $DIR/format-string-error.rs:17:22
55   |
56LL |     let _ = format!("}");
57   |                      ^ unmatched `}` in format string
58   |
59   = note: if you intended to print `}`, you can escape it using `}}`
60
61error: invalid format string: expected `'}'`, found `'\'`
62  --> $DIR/format-string-error.rs:19:23
63   |
64LL |     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
71error: invalid format string: expected `'}'` but string was terminated
72  --> $DIR/format-string-error.rs:21:35
73   |
74LL |     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
81error: invalid format string: expected `'}'` but string was terminated
82  --> $DIR/format-string-error.rs:27:3
83   |
84LL |     {"###);
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
91error: invalid format string: expected `'}'` but string was terminated
92  --> $DIR/format-string-error.rs:35:1
93   |
94LL |     {
95   |     - because of this opening brace
96LL | 
97LL | "###);
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
103  --> $DIR/format-string-error.rs:41:2
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
111  --> $DIR/format-string-error.rs:49:9
112   |
113LL |         }
114   |         ^ unmatched `}` in format string
115   |
116   = note: if you intended to print `}`, you can escape it using `}}`
117
118error: 3 positional arguments in format string, but there are 2 arguments
119  --> $DIR/format-string-error.rs:53:15
120   |
121LL |     println!("{} {} {}", 1, 2);
122   |               ^^ ^^ ^^   -  -
123
124error: aborting due to 14 previous errors
125