]>
Commit | Line | Data |
---|---|---|
29967ef6 XL |
1 | error: functional record updates are not allowed in destructuring assignments |
2 | --> $DIR/note-unsupported.rs:20:17 | |
3 | | | |
4 | LL | S { x: a, ..s } = S { x: 3, y: 4 }; | |
5 | | ^ help: consider removing the trailing pattern | |
6 | ||
dfeec247 XL |
7 | error[E0368]: binary assignment operation `+=` cannot be applied to type `({integer}, {integer})` |
8 | --> $DIR/note-unsupported.rs:7:5 | |
9 | | | |
10 | LL | (a, b) += (3, 4); | |
11 | | ------^^^^^^^^^^ | |
12 | | | | |
13 | | cannot use `+=` on type `({integer}, {integer})` | |
dfeec247 XL |
14 | |
15 | error[E0067]: invalid left-hand side of assignment | |
16 | --> $DIR/note-unsupported.rs:7:12 | |
17 | | | |
18 | LL | (a, b) += (3, 4); | |
19 | | ------ ^^ | |
20 | | | | |
21 | | cannot assign to this expression | |
dfeec247 XL |
22 | |
23 | error[E0368]: binary assignment operation `+=` cannot be applied to type `[{integer}; 2]` | |
24 | --> $DIR/note-unsupported.rs:11:5 | |
25 | | | |
26 | LL | [a, b] += [3, 4]; | |
27 | | ------^^^^^^^^^^ | |
28 | | | | |
29 | | cannot use `+=` on type `[{integer}; 2]` | |
dfeec247 XL |
30 | |
31 | error[E0067]: invalid left-hand side of assignment | |
32 | --> $DIR/note-unsupported.rs:11:12 | |
33 | | | |
34 | LL | [a, b] += [3, 4]; | |
35 | | ------ ^^ | |
36 | | | | |
37 | | cannot assign to this expression | |
dfeec247 XL |
38 | |
39 | error[E0368]: binary assignment operation `+=` cannot be applied to type `S` | |
40 | --> $DIR/note-unsupported.rs:17:5 | |
41 | | | |
42 | LL | S { x: a, y: b } += s; | |
43 | | ----------------^^^^^ | |
44 | | | | |
45 | | cannot use `+=` on type `S` | |
46 | | | |
c295e0f8 XL |
47 | note: an implementation of `AddAssign<_>` might be missing for `S` |
48 | --> $DIR/note-unsupported.rs:1:1 | |
49 | | | |
50 | LL | struct S { x: u8, y: u8 } | |
51 | | ^^^^^^^^ must implement `AddAssign<_>` | |
52 | note: the following trait must be implemented | |
53 | --> $SRC_DIR/core/src/ops/arith.rs:LL:COL | |
54 | | | |
064997fb FG |
55 | LL | pub trait AddAssign<Rhs = Self> { |
56 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
dfeec247 XL |
57 | |
58 | error[E0067]: invalid left-hand side of assignment | |
59 | --> $DIR/note-unsupported.rs:17:22 | |
60 | | | |
61 | LL | S { x: a, y: b } += s; | |
62 | | ---------------- ^^ | |
63 | | | | |
64 | | cannot assign to this expression | |
dfeec247 | 65 | |
a2a8927a | 66 | error: aborting due to 7 previous errors |
dfeec247 | 67 | |
a2a8927a | 68 | Some errors have detailed explanations: E0067, E0368. |
dfeec247 | 69 | For more information about an error, try `rustc --explain E0067`. |