]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-field-sensitivity.nll.stderr
Auto merge of #54813 - petrochenkov:uilocale, r=alexcrichton
[rust.git] / src / test / ui / borrowck / borrowck-field-sensitivity.nll.stderr
1 error[E0382]: use of moved value: `*x.b`
2   --> $DIR/borrowck-field-sensitivity.rs:18:10
3    |
4 LL |     drop(x.b);
5    |          --- value moved here
6 LL |     drop(*x.b); //~ ERROR use of moved value: `*x.b`
7    |          ^^^^ value used here after move
8
9 error[E0382]: use of moved value: `*x.b`
10   --> $DIR/borrowck-field-sensitivity.rs:24:10
11    |
12 LL |     let y = A { a: 3, .. x };
13    |             ---------------- value moved here
14 LL |     drop(*x.b); //~ ERROR use of moved value: `*x.b`
15    |          ^^^^ value used here after move
16
17 error[E0382]: borrow of moved value: `x.b`
18   --> $DIR/borrowck-field-sensitivity.rs:30:13
19    |
20 LL |     drop(x.b);
21    |          --- value moved here
22 LL |     let p = &x.b; //~ ERROR use of moved value: `x.b`
23    |             ^^^^ value borrowed here after move
24    |
25    = note: move occurs because `x.b` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
26
27 error[E0382]: borrow of moved value: `x.b`
28   --> $DIR/borrowck-field-sensitivity.rs:37:13
29    |
30 LL |     let _y = A { a: 3, .. x };
31    |              ---------------- value moved here
32 LL |     let p = &x.b; //~ ERROR use of moved value: `x.b`
33    |             ^^^^ value borrowed here after move
34    |
35    = note: move occurs because `x.b` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
36
37 error[E0505]: cannot move out of `x.b` because it is borrowed
38   --> $DIR/borrowck-field-sensitivity.rs:44:10
39    |
40 LL |     let p = &x.b;
41    |             ---- borrow of `x.b` occurs here
42 LL |     drop(x.b); //~ ERROR cannot move out of `x.b` because it is borrowed
43    |          ^^^ move out of `x.b` occurs here
44 LL |     drop(**p);
45    |          --- borrow later used here
46
47 error[E0505]: cannot move out of `x.b` because it is borrowed
48   --> $DIR/borrowck-field-sensitivity.rs:51:14
49    |
50 LL |     let p = &x.b;
51    |             ---- borrow of `x.b` occurs here
52 LL |     let _y = A { a: 3, .. x }; //~ ERROR cannot move out of `x.b` because it is borrowed
53    |              ^^^^^^^^^^^^^^^^ move out of `x.b` occurs here
54 LL |     drop(**p);
55    |          --- borrow later used here
56
57 error[E0499]: cannot borrow `x.a` as mutable more than once at a time
58   --> $DIR/borrowck-field-sensitivity.rs:58:13
59    |
60 LL |     let p = &mut x.a;
61    |             -------- first mutable borrow occurs here
62 LL |     let q = &mut x.a; //~ ERROR cannot borrow `x.a` as mutable more than once at a time
63    |             ^^^^^^^^ second mutable borrow occurs here
64 LL |     drop(*p);
65    |          -- first borrow later used here
66
67 error[E0382]: use of moved value: `x.b`
68   --> $DIR/borrowck-field-sensitivity.rs:66:10
69    |
70 LL |     drop(x.b);
71    |          --- value moved here
72 LL |     drop(x.b);  //~ ERROR use of moved value: `x.b`
73    |          ^^^ value used here after move
74    |
75    = note: move occurs because `x.b` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
76
77 error[E0382]: use of moved value: `x.b`
78   --> $DIR/borrowck-field-sensitivity.rs:72:10
79    |
80 LL |     let _y = A { a: 3, .. x };
81    |              ---------------- value moved here
82 LL |     drop(x.b);  //~ ERROR use of moved value: `x.b`
83    |          ^^^ value used here after move
84    |
85    = note: move occurs because `x.b` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
86
87 error[E0382]: use of moved value: `x.b`
88   --> $DIR/borrowck-field-sensitivity.rs:78:14
89    |
90 LL |     drop(x.b);
91    |          --- value moved here
92 LL |     let _z = A { a: 3, .. x };  //~ ERROR use of moved value: `x.b`
93    |              ^^^^^^^^^^^^^^^^ value used here after move
94    |
95    = note: move occurs because `x.b` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
96
97 error[E0382]: use of moved value: `x.b`
98   --> $DIR/borrowck-field-sensitivity.rs:84:14
99    |
100 LL |     let _y = A { a: 3, .. x };
101    |              ---------------- value moved here
102 LL |     let _z = A { a: 4, .. x };  //~ ERROR use of moved value: `x.b`
103    |              ^^^^^^^^^^^^^^^^ value used here after move
104    |
105    = note: move occurs because `x.b` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
106
107 error: aborting due to 11 previous errors
108
109 Some errors occurred: E0382, E0499, E0505.
110 For more information about an error, try `rustc --explain E0382`.