]> git.lizzy.rs Git - rust.git/blob - tests/ui/fmt/struct-field-as-captured-argument.stderr
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / fmt / struct-field-as-captured-argument.stderr
1 error: invalid format string: field access isn't supported
2   --> $DIR/struct-field-as-captured-argument.rs:11:15
3    |
4 LL |     format!("{foo.field}");
5    |               ^^^^^^^^^ not supported in format string
6    |
7 help: consider using a positional formatting argument instead
8    |
9 LL |     format!("{0}", foo.field);
10    |               ~  +++++++++++
11
12 error: invalid format string: field access isn't supported
13   --> $DIR/struct-field-as-captured-argument.rs:12:15
14    |
15 LL |     format!("{foo.field} {} {bar}", "aa");
16    |               ^^^^^^^^^ not supported in format string
17    |
18 help: consider using a positional formatting argument instead
19    |
20 LL |     format!("{1} {} {bar}", "aa", foo.field);
21    |               ~                 +++++++++++
22
23 error: invalid format string: field access isn't supported
24   --> $DIR/struct-field-as-captured-argument.rs:13:15
25    |
26 LL |     format!("{foo.field} {} {1} {bar}", "aa", "bb");
27    |               ^^^^^^^^^ not supported in format string
28    |
29 help: consider using a positional formatting argument instead
30    |
31 LL |     format!("{2} {} {1} {bar}", "aa", "bb", foo.field);
32    |               ~                           +++++++++++
33
34 error: invalid format string: field access isn't supported
35   --> $DIR/struct-field-as-captured-argument.rs:14:15
36    |
37 LL |     format!("{foo.field} {} {baz}", "aa", baz = 3);
38    |               ^^^^^^^^^ not supported in format string
39    |
40 help: consider using a positional formatting argument instead
41    |
42 LL |     format!("{1} {} {baz}", "aa", foo.field, baz = 3);
43    |               ~                 +++++++++++
44
45 error: invalid format string: field access isn't supported
46   --> $DIR/struct-field-as-captured-argument.rs:15:15
47    |
48 LL |     format!("{foo.field:?} {} {baz}", "aa", baz = 3);
49    |               ^^^^^^^^^ not supported in format string
50    |
51 help: consider using a positional formatting argument instead
52    |
53 LL |     format!("{1:?} {} {baz}", "aa", foo.field, baz = 3);
54    |               ~                   +++++++++++
55
56 error: invalid format string: field access isn't supported
57   --> $DIR/struct-field-as-captured-argument.rs:16:15
58    |
59 LL |     format!("{foo.field:#?} {} {baz}", "aa", baz = 3);
60    |               ^^^^^^^^^ not supported in format string
61    |
62 help: consider using a positional formatting argument instead
63    |
64 LL |     format!("{1:#?} {} {baz}", "aa", foo.field, baz = 3);
65    |               ~                    +++++++++++
66
67 error: invalid format string: field access isn't supported
68   --> $DIR/struct-field-as-captured-argument.rs:17:15
69    |
70 LL |     format!("{foo.field:.3} {} {baz}", "aa", baz = 3);
71    |               ^^^^^^^^^ not supported in format string
72    |
73 help: consider using a positional formatting argument instead
74    |
75 LL |     format!("{1:.3} {} {baz}", "aa", foo.field, baz = 3);
76    |               ~                    +++++++++++
77
78 error: aborting due to 7 previous errors
79