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