summary refs log tree commit diff
path: root/src/test/ui/moves/move-2-unique.rs
blob: 910a88c102f0fe37f06a2f3d1d6dee08bdb949eb (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass
#![allow(dead_code)]
#![feature(box_syntax)]

struct X { x: isize, y: isize, z: isize }

pub fn main() {
    let x: Box<_> = box X{x: 1, y: 2, z: 3};
    let y = x;
    assert_eq!(y.y, 2);
}