]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.nll.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / borrowck / issue-54499-field-mutation-of-moved-out.nll.stderr
1 error[E0594]: cannot assign to `t.0`, as `t` is not declared as mutable
2 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:23:9
3 |
4 LL | let t: Tuple = (S(0), 0);
5 | - help: consider changing this to be mutable: `mut t`
6 LL | drop(t);
7 LL | t.0 = S(1);
8 | ^^^^^^^^^^ cannot assign
9
10 error[E0382]: assign to part of moved value: `t`
11 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:23:9
12 |
13 LL | drop(t);
14 | - value moved here
15 LL | t.0 = S(1);
16 | ^^^^^^^^^^ value partially assigned here after move
17 |
18 = note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait
19
20 error[E0594]: cannot assign to `t.1`, as `t` is not declared as mutable
21 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:27:9
22 |
23 LL | let t: Tuple = (S(0), 0);
24 | - help: consider changing this to be mutable: `mut t`
25 ...
26 LL | t.1 = 2;
27 | ^^^^^^^ cannot assign
28
29 error[E0594]: cannot assign to `u.0`, as `u` is not declared as mutable
30 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:38:9
31 |
32 LL | let u: Tpair = Tpair(S(0), 0);
33 | - help: consider changing this to be mutable: `mut u`
34 LL | drop(u);
35 LL | u.0 = S(1);
36 | ^^^^^^^^^^ cannot assign
37
38 error[E0382]: assign to part of moved value: `u`
39 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:38:9
40 |
41 LL | drop(u);
42 | - value moved here
43 LL | u.0 = S(1);
44 | ^^^^^^^^^^ value partially assigned here after move
45 |
46 = note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait
47
48 error[E0594]: cannot assign to `u.1`, as `u` is not declared as mutable
49 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:42:9
50 |
51 LL | let u: Tpair = Tpair(S(0), 0);
52 | - help: consider changing this to be mutable: `mut u`
53 ...
54 LL | u.1 = 2;
55 | ^^^^^^^ cannot assign
56
57 error[E0594]: cannot assign to `v.x`, as `v` is not declared as mutable
58 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:53:9
59 |
60 LL | let v: Spair = Spair { x: S(0), y: 0 };
61 | - help: consider changing this to be mutable: `mut v`
62 LL | drop(v);
63 LL | v.x = S(1);
64 | ^^^^^^^^^^ cannot assign
65
66 error[E0382]: assign to part of moved value: `v`
67 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:53:9
68 |
69 LL | drop(v);
70 | - value moved here
71 LL | v.x = S(1);
72 | ^^^^^^^^^^ value partially assigned here after move
73 |
74 = note: move occurs because `v` has type `Spair`, which does not implement the `Copy` trait
75
76 error[E0594]: cannot assign to `v.y`, as `v` is not declared as mutable
77 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:57:9
78 |
79 LL | let v: Spair = Spair { x: S(0), y: 0 };
80 | - help: consider changing this to be mutable: `mut v`
81 ...
82 LL | v.y = 2;
83 | ^^^^^^^ cannot assign
84
85 error: aborting due to 9 previous errors
86
87 Some errors occurred: E0382, E0594.
88 For more information about an error, try `rustc --explain E0382`.