3 #![allow(unused_variables)]
4 // pretty-expanded FIXME #23616
6 struct A { a: isize, b: Box<isize> }
7 struct B { a: Box<isize>, b: Box<isize> }
10 let x
= A { a: 1, b: Box::new(2) }
;
15 fn move_after_fu_copy() {
16 let x
= A { a: 1, b: Box::new(2) }
;
17 let _y
= A { b: Box::new(3), .. x }
;
21 fn fu_move_after_copy() {
22 let x
= A { a: 1, b: Box::new(2) }
;
24 let _y
= A { a: 3, .. x }
;
27 fn fu_move_after_fu_copy() {
28 let x
= A { a: 1, b: Box::new(2) }
;
29 let _y
= A { b: Box::new(3), .. x }
;
30 let _z
= A { a: 4, .. x }
;
33 fn copy_after_move() {
34 let x
= A { a: 1, b: Box::new(2) }
;
39 fn copy_after_fu_move() {
40 let x
= A { a: 1, b: Box::new(2) }
;
41 let y
= A { a: 3, .. x }
;
45 fn fu_copy_after_move() {
46 let x
= A { a: 1, b: Box::new(2) }
;
48 let _y
= A { b: Box::new(3), .. x }
;
51 fn fu_copy_after_fu_move() {
52 let x
= A { a: 1, b: Box::new(2) }
;
53 let _y
= A { a: 3, .. x }
;
54 let _z
= A { b: Box::new(3), .. x }
;
57 fn borrow_after_move() {
58 let x
= A { a: 1, b: Box::new(2) }
;
64 fn borrow_after_fu_move() {
65 let x
= A { a: 1, b: Box::new(2) }
;
66 let _y
= A { a: 3, .. x }
;
71 fn move_after_borrow() {
72 let x
= A { a: 1, b: Box::new(2) }
;
78 fn fu_move_after_borrow() {
79 let x
= A { a: 1, b: Box::new(2) }
;
81 let _y
= A { a: 3, .. x }
;
85 fn mut_borrow_after_mut_borrow() {
86 let mut x
= A { a: 1, b: Box::new(2) }
;
93 fn move_after_move() {
94 let x
= B { a: Box::new(1), b: Box::new(2) }
;
99 fn move_after_fu_move() {
100 let x
= B { a: Box::new(1), b: Box::new(2) }
;
101 let y
= B { a: Box::new(3), .. x }
;
105 fn fu_move_after_move() {
106 let x
= B { a: Box::new(1), b: Box::new(2) }
;
108 let z
= B { a: Box::new(3), .. x }
;
112 fn fu_move_after_fu_move() {
113 let x
= B { a: Box::new(1), b: Box::new(2) }
;
114 let _y
= B { b: Box::new(3), .. x }
;
115 let _z
= B { a: Box::new(4), .. x }
;
118 fn copy_after_assign_after_move() {
119 let mut x
= A { a: 1, b: Box::new(2) }
;
121 x
= A { a: 3, b: Box::new(4) }
;
125 fn copy_after_assign_after_fu_move() {
126 let mut x
= A { a: 1, b: Box::new(2) }
;
127 let _y
= A { a: 3, .. x }
;
128 x
= A { a: 3, b: Box::new(4) }
;
132 fn copy_after_field_assign_after_move() {
133 let mut x
= A { a: 1, b: Box::new(2) }
;
139 fn copy_after_field_assign_after_fu_move() {
140 let mut x
= A { a: 1, b: Box::new(2) }
;
141 let _y
= A { a: 3, .. x }
;
146 fn borrow_after_assign_after_move() {
147 let mut x
= A { a: 1, b: Box::new(2) }
;
149 x
= A { a: 3, b: Box::new(4) }
;
154 fn borrow_after_assign_after_fu_move() {
155 let mut x
= A { a: 1, b: Box::new(2) }
;
156 let _y
= A { a: 3, .. x }
;
157 x
= A { a: 3, b: Box::new(4) }
;
162 fn borrow_after_field_assign_after_move() {
163 let mut x
= A { a: 1, b: Box::new(2) }
;
170 fn borrow_after_field_assign_after_fu_move() {
171 let mut x
= A { a: 1, b: Box::new(2) }
;
172 let _y
= A { a: 3, .. x }
;
178 fn move_after_assign_after_move() {
179 let mut x
= A { a: 1, b: Box::new(2) }
;
181 x
= A { a: 3, b: Box::new(4) }
;
185 fn move_after_assign_after_fu_move() {
186 let mut x
= A { a: 1, b: Box::new(2) }
;
187 let _y
= A { a: 3, .. x }
;
188 x
= A { a: 3, b: Box::new(4) }
;
192 fn move_after_field_assign_after_move() {
193 let mut x
= A { a: 1, b: Box::new(2) }
;
199 fn move_after_field_assign_after_fu_move() {
200 let mut x
= A { a: 1, b: Box::new(2) }
;
201 let _y
= A { a: 3, .. x }
;
206 fn copy_after_assign_after_uninit() {
208 x
= A { a: 1, b: Box::new(2) }
;
212 fn borrow_after_assign_after_uninit() {
214 x
= A { a: 1, b: Box::new(2) }
;
219 fn move_after_assign_after_uninit() {
221 x
= A { a: 1, b: Box::new(2) }
;
227 move_after_fu_copy();
228 fu_move_after_copy();
229 fu_move_after_fu_copy();
231 copy_after_fu_move();
232 fu_copy_after_move();
233 fu_copy_after_fu_move();
236 borrow_after_fu_move();
238 fu_move_after_borrow();
239 mut_borrow_after_mut_borrow();
242 move_after_fu_move();
243 fu_move_after_move();
244 fu_move_after_fu_move();
246 copy_after_assign_after_move();
247 copy_after_assign_after_fu_move();
248 copy_after_field_assign_after_move();
249 copy_after_field_assign_after_fu_move();
251 borrow_after_assign_after_move();
252 borrow_after_assign_after_fu_move();
253 borrow_after_field_assign_after_move();
254 borrow_after_field_assign_after_fu_move();
256 move_after_assign_after_move();
257 move_after_assign_after_fu_move();
258 move_after_field_assign_after_move();
259 move_after_field_assign_after_fu_move();
261 copy_after_assign_after_uninit();
262 borrow_after_assign_after_uninit();
263 move_after_assign_after_uninit();