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