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