@@ -10,12 +10,12 @@ LL | t.0 = S(1);
1010error[E0382]: assign to part of moved value: `t`
1111 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:23:9
1212 |
13+ LL | let t: Tuple = (S(0), 0);
14+ | - move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait
1315LL | drop(t);
1416 | - value moved here
1517LL | t.0 = S(1);
1618 | ^^^^^^^^^^ value partially assigned here after move
17- |
18- = note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait
1919
2020error[E0594]: cannot assign to `t.1`, as `t` is not declared as mutable
2121 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:27:9
@@ -38,12 +38,12 @@ LL | u.0 = S(1);
3838error[E0382]: assign to part of moved value: `u`
3939 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:38:9
4040 |
41+ LL | let u: Tpair = Tpair(S(0), 0);
42+ | - move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait
4143LL | drop(u);
4244 | - value moved here
4345LL | u.0 = S(1);
4446 | ^^^^^^^^^^ value partially assigned here after move
45- |
46- = note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait
4747
4848error[E0594]: cannot assign to `u.1`, as `u` is not declared as mutable
4949 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:42:9
@@ -66,12 +66,12 @@ LL | v.x = S(1);
6666error[E0382]: assign to part of moved value: `v`
6767 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:53:9
6868 |
69+ LL | let v: Spair = Spair { x: S(0), y: 0 };
70+ | - move occurs because `v` has type `Spair`, which does not implement the `Copy` trait
6971LL | drop(v);
7072 | - value moved here
7173LL | v.x = S(1);
7274 | ^^^^^^^^^^ value partially assigned here after move
73- |
74- = note: move occurs because `v` has type `Spair`, which does not implement the `Copy` trait
7575
7676error[E0594]: cannot assign to `v.y`, as `v` is not declared as mutable
7777 --> $DIR/issue-54499-field-mutation-of-moved-out.rs:57:9
0 commit comments