blob: 565272af39049fdc9a8895f9ecd0d1753db0da3c [file] [log] [blame]
error[E0594]: cannot assign to field `t.0` of immutable binding
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:23:9
|
LL | let t: Tuple = (S(0), 0);
| - help: make this binding mutable: `mut t`
LL | drop(t);
LL | t.0 = S(1);
| ^^^^^^^^^^ cannot mutably borrow field of immutable binding
error[E0594]: cannot assign to field `t.1` of immutable binding
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:27:9
|
LL | let t: Tuple = (S(0), 0);
| - help: make this binding mutable: `mut t`
...
LL | t.1 = 2;
| ^^^^^^^ cannot mutably borrow field of immutable binding
error[E0594]: cannot assign to field `u.0` of immutable binding
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:38:9
|
LL | let u: Tpair = Tpair(S(0), 0);
| - help: make this binding mutable: `mut u`
LL | drop(u);
LL | u.0 = S(1);
| ^^^^^^^^^^ cannot mutably borrow field of immutable binding
error[E0594]: cannot assign to field `u.1` of immutable binding
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:42:9
|
LL | let u: Tpair = Tpair(S(0), 0);
| - help: make this binding mutable: `mut u`
...
LL | u.1 = 2;
| ^^^^^^^ cannot mutably borrow field of immutable binding
error[E0594]: cannot assign to field `v.x` of immutable binding
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:53:9
|
LL | let v: Spair = Spair { x: S(0), y: 0 };
| - help: make this binding mutable: `mut v`
LL | drop(v);
LL | v.x = S(1);
| ^^^^^^^^^^ cannot mutably borrow field of immutable binding
error[E0594]: cannot assign to field `v.y` of immutable binding
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:57:9
|
LL | let v: Spair = Spair { x: S(0), y: 0 };
| - help: make this binding mutable: `mut v`
...
LL | v.y = 2;
| ^^^^^^^ cannot mutably borrow field of immutable binding
error[E0382]: use of moved value: `t.0`
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:30:31
|
LL | drop(t);
| - value moved here
...
LL | println!("{:?} {:?}", t.0, t.1);
| ^^^ value used here after move
|
= note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `t.1`
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:30:36
|
LL | drop(t);
| - value moved here
...
LL | println!("{:?} {:?}", t.0, t.1);
| ^^^ value used here after move
|
= note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `u.0`
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:45:31
|
LL | drop(u);
| - value moved here
...
LL | println!("{:?} {:?}", u.0, u.1);
| ^^^ value used here after move
|
= note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `u.1`
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:45:36
|
LL | drop(u);
| - value moved here
...
LL | println!("{:?} {:?}", u.0, u.1);
| ^^^ value used here after move
|
= note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `v.x`
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:60:31
|
LL | drop(v);
| - value moved here
...
LL | println!("{:?} {:?}", v.x, v.y);
| ^^^ value used here after move
|
= note: move occurs because `v` has type `Spair`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `v.y`
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:60:36
|
LL | drop(v);
| - value moved here
...
LL | println!("{:?} {:?}", v.x, v.y);
| ^^^ value used here after move
|
= note: move occurs because `v` has type `Spair`, which does not implement the `Copy` trait
error: aborting due to 12 previous errors
Some errors occurred: E0382, E0594.
For more information about an error, try `rustc --explain E0382`.