]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/borrowck-field-sensitivity.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-field-sensitivity.stderr
CommitLineData
48663c56 1error[E0382]: use of moved value: `x.b`
0731742a 2 --> $DIR/borrowck-field-sensitivity.rs:8:10
b7449926
XL
3 |
4LL | drop(x.b);
5 | --- value moved here
532ac7d7 6LL | 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 11error[E0382]: use of moved value: `x.b`
0731742a 12 --> $DIR/borrowck-field-sensitivity.rs:14:10
b7449926
XL
13 |
14LL | let y = A { a: 3, .. x };
48663c56 15 | ---------------- value moved here
532ac7d7 16LL | 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
21error[E0382]: borrow of moved value: `x.b`
22 --> $DIR/borrowck-field-sensitivity.rs:20:13
b7449926
XL
23 |
24LL | drop(x.b);
25 | --- value moved here
532ac7d7 26LL | 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
31error[E0382]: borrow of moved value: `x.b`
32 --> $DIR/borrowck-field-sensitivity.rs:27:13
b7449926
XL
33 |
34LL | let _y = A { a: 3, .. x };
48663c56 35 | ---------------- value moved here
532ac7d7 36LL | 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
41error[E0505]: cannot move out of `x.b` because it is borrowed
0731742a 42 --> $DIR/borrowck-field-sensitivity.rs:34:10
b7449926
XL
43 |
44LL | let p = &x.b;
48663c56 45 | ---- borrow of `x.b` occurs here
532ac7d7 46LL | drop(x.b);
b7449926 47 | ^^^ move out of `x.b` occurs here
48663c56
XL
48LL | drop(**p);
49 | --- borrow later used here
b7449926
XL
50
51error[E0505]: cannot move out of `x.b` because it is borrowed
48663c56 52 --> $DIR/borrowck-field-sensitivity.rs:41:14
b7449926
XL
53 |
54LL | let p = &x.b;
48663c56 55 | ---- borrow of `x.b` occurs here
532ac7d7 56LL | let _y = A { a: 3, .. x };
48663c56
XL
57 | ^^^^^^^^^^^^^^^^ move out of `x.b` occurs here
58LL | drop(**p);
59 | --- borrow later used here
b7449926
XL
60
61error[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 |
64LL | let p = &mut x.a;
48663c56 65 | -------- first mutable borrow occurs here
532ac7d7 66LL | let q = &mut x.a;
48663c56
XL
67 | ^^^^^^^^ second mutable borrow occurs here
68LL | drop(*p);
69 | -- first borrow later used here
b7449926
XL
70
71error[E0382]: use of moved value: `x.b`
0731742a 72 --> $DIR/borrowck-field-sensitivity.rs:56:10
b7449926
XL
73 |
74LL | drop(x.b);
75 | --- value moved here
532ac7d7 76LL | 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
81error[E0382]: use of moved value: `x.b`
0731742a 82 --> $DIR/borrowck-field-sensitivity.rs:62:10
b7449926
XL
83 |
84LL | let _y = A { a: 3, .. x };
48663c56 85 | ---------------- value moved here
532ac7d7 86LL | 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
91error[E0382]: use of moved value: `x.b`
48663c56 92 --> $DIR/borrowck-field-sensitivity.rs:68:14
b7449926
XL
93 |
94LL | drop(x.b);
95 | --- value moved here
532ac7d7 96LL | 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
101error[E0382]: use of moved value: `x.b`
48663c56 102 --> $DIR/borrowck-field-sensitivity.rs:74:14
b7449926
XL
103 |
104LL | let _y = A { a: 3, .. x };
48663c56 105 | ---------------- value moved here
532ac7d7 106LL | 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 111error[E0381]: assign to part of possibly-uninitialized variable: `x`
48663c56 112 --> $DIR/borrowck-field-sensitivity.rs:81:5
b7449926 113 |
48663c56 114LL | x.a = 1;
e1599b0c 115 | ^^^^^^^ use of possibly-uninitialized `x`
b7449926 116
e1599b0c 117error[E0381]: assign to part of possibly-uninitialized variable: `x`
48663c56 118 --> $DIR/borrowck-field-sensitivity.rs:87:5
b7449926 119 |
48663c56 120LL | x.a = 1;
e1599b0c 121 | ^^^^^^^ use of possibly-uninitialized `x`
b7449926 122
e1599b0c 123error[E0381]: assign to part of possibly-uninitialized variable: `x`
48663c56 124 --> $DIR/borrowck-field-sensitivity.rs:94:5
b7449926 125 |
48663c56 126LL | x.b = box 1;
e1599b0c 127 | ^^^ use of possibly-uninitialized `x`
b7449926
XL
128
129error: aborting due to 14 previous errors
130
48663c56 131Some errors have detailed explanations: E0381, E0382, E0499, E0505.
b7449926 132For more information about an error, try `rustc --explain E0381`.