9 lines
192 B
Rust
9 lines
192 B
Rust
|
// xfail-test
|
||
|
|
||
|
fn box<T>(x: {x: T, y: T, z: T}) -> ~{x: T, y: T, z: T} { ret ~x; }
|
||
|
|
||
|
fn main() {
|
||
|
let x: ~{x: int, y: int, z: int} = box::<int>({x: 1, y: 2, z: 3});
|
||
|
assert (x.y == 2);
|
||
|
}
|