@@ -58,27 +58,6 @@ LL | format!("{name} {value} {} {} {} {} {} {}", 0, name=1, value=2);
58
58
|
59
59
= note: positional arguments are zero-based
60
60
61
- error: there is no argument named `foo`
62
- --> $DIR/ifmt-bad-arg.rs:27:17
63
- |
64
- LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
65
- | ^^^^^
66
- |
67
-
68
- error: there is no argument named `bar`
69
- --> $DIR/ifmt-bad-arg.rs:27:26
70
- |
71
- LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
72
- | ^^^^^
73
- |
74
-
75
- error: there is no argument named `foo`
76
- --> $DIR/ifmt-bad-arg.rs:31:14
77
- |
78
- LL | format!("{foo}");
79
- | ^^^^^
80
- |
81
-
82
61
error: multiple unused formatting arguments
83
62
--> $DIR/ifmt-bad-arg.rs:32:17
84
63
|
@@ -153,13 +132,6 @@ LL | format!("{foo} {} {}", foo=1, 2);
153
132
| |
154
133
| named argument
155
134
156
- error: there is no argument named `valueb`
157
- --> $DIR/ifmt-bad-arg.rs:45:23
158
- |
159
- LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
160
- | ^^^^^^^^
161
- |
162
-
163
135
error: named argument never used
164
136
--> $DIR/ifmt-bad-arg.rs:45:51
165
137
|
@@ -204,13 +176,6 @@ LL | format!("foo %s baz", "bar");
204
176
|
205
177
= note: printf formatting not supported; see the documentation for `std::fmt`
206
178
207
- error: there is no argument named `foo`
208
- --> $DIR/ifmt-bad-arg.rs:60:9
209
- |
210
- LL | {foo}
211
- | ^^^^^
212
- |
213
-
214
179
error: invalid format string: expected `'}'`, found `'t'`
215
180
--> $DIR/ifmt-bad-arg.rs:75:1
216
181
|
@@ -297,6 +262,36 @@ LL | println!("{:.*}");
297
262
= note: positional arguments are zero-based
298
263
= note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html
299
264
265
+ error[E0425]: cannot find value `foo` in this scope
266
+ --> $DIR/ifmt-bad-arg.rs:27:17
267
+ |
268
+ LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
269
+ | ^^^^^ not found in this scope
270
+
271
+ error[E0425]: cannot find value `bar` in this scope
272
+ --> $DIR/ifmt-bad-arg.rs:27:26
273
+ |
274
+ LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
275
+ | ^^^^^ not found in this scope
276
+
277
+ error[E0425]: cannot find value `foo` in this scope
278
+ --> $DIR/ifmt-bad-arg.rs:31:14
279
+ |
280
+ LL | format!("{foo}");
281
+ | ^^^^^ not found in this scope
282
+
283
+ error[E0425]: cannot find value `valueb` in this scope
284
+ --> $DIR/ifmt-bad-arg.rs:45:23
285
+ |
286
+ LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
287
+ | ^^^^^^^^ not found in this scope
288
+
289
+ error[E0425]: cannot find value `foo` in this scope
290
+ --> $DIR/ifmt-bad-arg.rs:60:9
291
+ |
292
+ LL | {foo}
293
+ | ^^^^^ not found in this scope
294
+
300
295
error[E0308]: mismatched types
301
296
--> $DIR/ifmt-bad-arg.rs:78:32
302
297
|
@@ -319,4 +314,5 @@ LL | println!("{} {:07$.*} {}", 1, 3.2, 4);
319
314
320
315
error: aborting due to 36 previous errors
321
316
322
- For more information about this error, try `rustc --explain E0308`.
317
+ Some errors have detailed explanations: E0308, E0425.
318
+ For more information about an error, try `rustc --explain E0308`.
0 commit comments