1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // pretty-expanded FIXME #23616
13 #![feature(box_syntax)]
15 struct A { a: isize, b: Box<isize> }
17 fn field_copy_after_field_borrow() {
18 let mut x = A { a: 1, b: box 2 };
24 fn fu_field_copy_after_field_borrow() {
25 let mut x = A { a: 1, b: box 2 };
27 let y = A { b: box 3, .. x };
32 fn field_deref_after_field_borrow() {
33 let mut x = A { a: 1, b: box 2 };
39 fn field_move_after_field_borrow() {
40 let mut x = A { a: 1, b: box 2 };
46 fn fu_field_move_after_field_borrow() {
47 let mut x = A { a: 1, b: box 2 };
49 let y = A { a: 3, .. x };
55 field_copy_after_field_borrow();
56 fu_field_copy_after_field_borrow();
57 field_deref_after_field_borrow();
58 field_move_after_field_borrow();
59 fu_field_move_after_field_borrow();