]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error[E0382]: use of moved value: `x.b` |
0731742a | 2 | --> $DIR/borrowck-field-sensitivity.rs:8:10 |
b7449926 XL |
3 | | |
4 | LL | drop(x.b); | |
5 | | --- value moved here | |
532ac7d7 | 6 | LL | drop(*x.b); |
b7449926 XL |
7 | | ^^^^ value used here after move |
8 | | | |
1b1a35ee | 9 | = note: move occurs because `x.b` has type `Box<isize>`, which does not implement the `Copy` trait |
b7449926 | 10 | |
48663c56 | 11 | error[E0382]: use of moved value: `x.b` |
0731742a | 12 | --> $DIR/borrowck-field-sensitivity.rs:14:10 |
b7449926 XL |
13 | | |
14 | LL | let y = A { a: 3, .. x }; | |
48663c56 | 15 | | ---------------- value moved here |
532ac7d7 | 16 | LL | drop(*x.b); |
b7449926 XL |
17 | | ^^^^ value used here after move |
18 | | | |
1b1a35ee | 19 | = note: move occurs because `x.b` has type `Box<isize>`, which does not implement the `Copy` trait |
b7449926 | 20 | |
48663c56 XL |
21 | error[E0382]: borrow of moved value: `x.b` |
22 | --> $DIR/borrowck-field-sensitivity.rs:20:13 | |
b7449926 XL |
23 | | |
24 | LL | drop(x.b); | |
25 | | --- value moved here | |
532ac7d7 | 26 | LL | let p = &x.b; |
48663c56 | 27 | | ^^^^ value borrowed here after move |
b7449926 | 28 | | |
1b1a35ee | 29 | = note: move occurs because `x.b` has type `Box<isize>`, which does not implement the `Copy` trait |
b7449926 | 30 | |
48663c56 XL |
31 | error[E0382]: borrow of moved value: `x.b` |
32 | --> $DIR/borrowck-field-sensitivity.rs:27:13 | |
b7449926 XL |
33 | | |
34 | LL | let _y = A { a: 3, .. x }; | |
48663c56 | 35 | | ---------------- value moved here |
532ac7d7 | 36 | LL | let p = &x.b; |
48663c56 | 37 | | ^^^^ value borrowed here after move |
b7449926 | 38 | | |
1b1a35ee | 39 | = note: move occurs because `x.b` has type `Box<isize>`, which does not implement the `Copy` trait |
b7449926 XL |
40 | |
41 | error[E0505]: cannot move out of `x.b` because it is borrowed | |
0731742a | 42 | --> $DIR/borrowck-field-sensitivity.rs:34:10 |
b7449926 XL |
43 | | |
44 | LL | let p = &x.b; | |
48663c56 | 45 | | ---- borrow of `x.b` occurs here |
532ac7d7 | 46 | LL | drop(x.b); |
b7449926 | 47 | | ^^^ move out of `x.b` occurs here |
48663c56 XL |
48 | LL | drop(**p); |
49 | | --- borrow later used here | |
b7449926 XL |
50 | |
51 | error[E0505]: cannot move out of `x.b` because it is borrowed | |
48663c56 | 52 | --> $DIR/borrowck-field-sensitivity.rs:41:14 |
b7449926 XL |
53 | | |
54 | LL | let p = &x.b; | |
48663c56 | 55 | | ---- borrow of `x.b` occurs here |
532ac7d7 | 56 | LL | let _y = A { a: 3, .. x }; |
48663c56 XL |
57 | | ^^^^^^^^^^^^^^^^ move out of `x.b` occurs here |
58 | LL | drop(**p); | |
59 | | --- borrow later used here | |
b7449926 XL |
60 | |
61 | error[E0499]: cannot borrow `x.a` as mutable more than once at a time | |
48663c56 | 62 | --> $DIR/borrowck-field-sensitivity.rs:48:13 |
b7449926 XL |
63 | | |
64 | LL | let p = &mut x.a; | |
48663c56 | 65 | | -------- first mutable borrow occurs here |
532ac7d7 | 66 | LL | let q = &mut x.a; |
48663c56 XL |
67 | | ^^^^^^^^ second mutable borrow occurs here |
68 | LL | drop(*p); | |
69 | | -- first borrow later used here | |
b7449926 XL |
70 | |
71 | error[E0382]: use of moved value: `x.b` | |
0731742a | 72 | --> $DIR/borrowck-field-sensitivity.rs:56:10 |
b7449926 XL |
73 | | |
74 | LL | drop(x.b); | |
75 | | --- value moved here | |
532ac7d7 | 76 | LL | drop(x.b); |
b7449926 XL |
77 | | ^^^ value used here after move |
78 | | | |
1b1a35ee | 79 | = note: move occurs because `x.b` has type `Box<isize>`, which does not implement the `Copy` trait |
b7449926 XL |
80 | |
81 | error[E0382]: use of moved value: `x.b` | |
0731742a | 82 | --> $DIR/borrowck-field-sensitivity.rs:62:10 |
b7449926 XL |
83 | | |
84 | LL | let _y = A { a: 3, .. x }; | |
48663c56 | 85 | | ---------------- value moved here |
532ac7d7 | 86 | LL | drop(x.b); |
b7449926 XL |
87 | | ^^^ value used here after move |
88 | | | |
1b1a35ee | 89 | = note: move occurs because `x.b` has type `Box<isize>`, which does not implement the `Copy` trait |
b7449926 XL |
90 | |
91 | error[E0382]: use of moved value: `x.b` | |
48663c56 | 92 | --> $DIR/borrowck-field-sensitivity.rs:68:14 |
b7449926 XL |
93 | | |
94 | LL | drop(x.b); | |
95 | | --- value moved here | |
532ac7d7 | 96 | LL | let _z = A { a: 3, .. x }; |
48663c56 | 97 | | ^^^^^^^^^^^^^^^^ value used here after move |
b7449926 | 98 | | |
1b1a35ee | 99 | = note: move occurs because `x.b` has type `Box<isize>`, which does not implement the `Copy` trait |
b7449926 XL |
100 | |
101 | error[E0382]: use of moved value: `x.b` | |
48663c56 | 102 | --> $DIR/borrowck-field-sensitivity.rs:74:14 |
b7449926 XL |
103 | | |
104 | LL | let _y = A { a: 3, .. x }; | |
48663c56 | 105 | | ---------------- value moved here |
532ac7d7 | 106 | LL | let _z = A { a: 4, .. x }; |
48663c56 | 107 | | ^^^^^^^^^^^^^^^^ value used here after move |
b7449926 | 108 | | |
1b1a35ee | 109 | = note: move occurs because `x.b` has type `Box<isize>`, which does not implement the `Copy` trait |
b7449926 | 110 | |
e1599b0c | 111 | error[E0381]: assign to part of possibly-uninitialized variable: `x` |
48663c56 | 112 | --> $DIR/borrowck-field-sensitivity.rs:81:5 |
b7449926 | 113 | | |
48663c56 | 114 | LL | x.a = 1; |
e1599b0c | 115 | | ^^^^^^^ use of possibly-uninitialized `x` |
b7449926 | 116 | |
e1599b0c | 117 | error[E0381]: assign to part of possibly-uninitialized variable: `x` |
48663c56 | 118 | --> $DIR/borrowck-field-sensitivity.rs:87:5 |
b7449926 | 119 | | |
48663c56 | 120 | LL | x.a = 1; |
e1599b0c | 121 | | ^^^^^^^ use of possibly-uninitialized `x` |
b7449926 | 122 | |
e1599b0c | 123 | error[E0381]: assign to part of possibly-uninitialized variable: `x` |
48663c56 | 124 | --> $DIR/borrowck-field-sensitivity.rs:94:5 |
b7449926 | 125 | | |
48663c56 | 126 | LL | x.b = box 1; |
e1599b0c | 127 | | ^^^ use of possibly-uninitialized `x` |
b7449926 XL |
128 | |
129 | error: aborting due to 14 previous errors | |
130 | ||
48663c56 | 131 | Some errors have detailed explanations: E0381, E0382, E0499, E0505. |
b7449926 | 132 | For more information about an error, try `rustc --explain E0381`. |