Hi all, I'm really confused. What's about Shared 2 Owned conversions? This
one looks ugly, nevertheless works:

let a = @5;

let b = *a;

let c = ~b;

io::println(fmt!("%?, %?, %?", a, b, c));

> @5, 5, ~5

But what about arrays?

let a = @[5];

let b = *a;

let c = ~b;


> error: type @[<VI0>] cannot be dereferenced

Is it true, that there is no any way for converting between different boxes
types without deep copying of objects?! I'm shocked %)
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to