1 error: invalid format string: field access isn't supported
2 --> $DIR/struct-field-as-captured-argument.rs:11:15
4 LL | format!("{foo.field}");
5 | ^^^^^^^^^ not supported in format string
7 help: consider using a positional formatting argument instead
9 LL | format!("{0}", foo.field);
12 error: invalid format string: field access isn't supported
13 --> $DIR/struct-field-as-captured-argument.rs:12:15
15 LL | format!("{foo.field} {} {bar}", "aa");
16 | ^^^^^^^^^ not supported in format string
18 help: consider using a positional formatting argument instead
20 LL | format!("{1} {} {bar}", "aa", foo.field);
23 error: invalid format string: field access isn't supported
24 --> $DIR/struct-field-as-captured-argument.rs:13:15
26 LL | format!("{foo.field} {} {1} {bar}", "aa", "bb");
27 | ^^^^^^^^^ not supported in format string
29 help: consider using a positional formatting argument instead
31 LL | format!("{2} {} {1} {bar}", "aa", "bb", foo.field);
34 error: invalid format string: field access isn't supported
35 --> $DIR/struct-field-as-captured-argument.rs:14:15
37 LL | format!("{foo.field} {} {baz}", "aa", baz = 3);
38 | ^^^^^^^^^ not supported in format string
40 help: consider using a positional formatting argument instead
42 LL | format!("{1} {} {baz}", "aa", foo.field, baz = 3);
45 error: invalid format string: field access isn't supported
46 --> $DIR/struct-field-as-captured-argument.rs:15:15
48 LL | format!("{foo.field:?} {} {baz}", "aa", baz = 3);
49 | ^^^^^^^^^ not supported in format string
51 help: consider using a positional formatting argument instead
53 LL | format!("{1:?} {} {baz}", "aa", foo.field, baz = 3);
56 error: invalid format string: field access isn't supported
57 --> $DIR/struct-field-as-captured-argument.rs:16:15
59 LL | format!("{foo.field:#?} {} {baz}", "aa", baz = 3);
60 | ^^^^^^^^^ not supported in format string
62 help: consider using a positional formatting argument instead
64 LL | format!("{1:#?} {} {baz}", "aa", foo.field, baz = 3);
67 error: invalid format string: field access isn't supported
68 --> $DIR/struct-field-as-captured-argument.rs:17:15
70 LL | format!("{foo.field:.3} {} {baz}", "aa", baz = 3);
71 | ^^^^^^^^^ not supported in format string
73 help: consider using a positional formatting argument instead
75 LL | format!("{1:.3} {} {baz}", "aa", foo.field, baz = 3);
78 error: aborting due to 7 previous errors