rust/src/test/compile-fail/borrowck-unary-move-2.rs
2012-08-17 10:13:45 -07:00

9 lines
225 B
Rust

struct noncopyable {
i: (); new() { self.i = (); } drop { #error["dropped"]; }
}
enum wrapper = noncopyable;
fn main() {
let x1 = wrapper(noncopyable());
let _x2 = move *x1; //~ ERROR moving out of enum content
}