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