fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.0 KiB66 linesraw
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
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})`
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
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]`
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
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   |
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 trait `AddAssign` must be implemented
53  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
54
55error[E0067]: invalid left-hand side of assignment
56  --> $DIR/note-unsupported.rs:17:22
57   |
58LL |     S { x: a, y: b } += s;
59   |     ---------------- ^^
60   |     |
61   |     cannot assign to this expression
62
63error: aborting due to 7 previous errors
64
65Some errors have detailed explanations: E0067, E0368.
66For more information about an error, try `rustc --explain E0067`.