2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2011-09-23 16:58:06 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
struct X { x: isize, y: isize, z: isize }
|
2011-09-23 16:58:06 -05:00
|
|
|
|
2014-05-05 20:56:44 -05:00
|
|
|
pub fn main() {
|
2021-08-24 19:39:40 -05:00
|
|
|
let x: Box<_> = Box::new(X {x: 1, y: 2, z: 3});
|
2014-05-05 20:56:44 -05:00
|
|
|
let y = x;
|
2015-06-07 13:00:38 -05:00
|
|
|
assert_eq!(y.y, 2);
|
2014-05-05 20:56:44 -05:00
|
|
|
}
|