mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
11 lines
186 B
Rust
11 lines
186 B
Rust
// run-pass
|
|
#![allow(dead_code)]
|
|
|
|
struct X { x: isize, y: isize, z: isize }
|
|
|
|
pub fn main() {
|
|
let x: Box<_> = Box::new(X {x: 1, y: 2, z: 3});
|
|
let y = x;
|
|
assert_eq!(y.y, 2);
|
|
}
|