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 #![allow(unknown_features)]
12 #![feature(box_syntax)]
14 struct A { a: int, b: Box<int> }
16 fn field_copy_after_field_borrow() {
17 let mut x = A { a: 1, b: box 2 };
23 fn fu_field_copy_after_field_borrow() {
24 let mut x = A { a: 1, b: box 2 };
26 let y = A { b: box 3, .. x };
31 fn field_deref_after_field_borrow() {
32 let mut x = A { a: 1, b: box 2 };
38 fn field_move_after_field_borrow() {
39 let mut x = A { a: 1, b: box 2 };
45 fn fu_field_move_after_field_borrow() {
46 let mut x = A { a: 1, b: box 2 };
48 let y = A { a: 3, .. x };
54 field_copy_after_field_borrow();
55 fu_field_copy_after_field_borrow();
56 field_deref_after_field_borrow();
57 field_move_after_field_borrow();
58 fu_field_move_after_field_borrow();