rust/src/test/compile-fail/borrowck-unary-move-2.rs

9 lines
225 B
Rust
Raw Normal View History

2012-08-15 20:46:55 -05:00
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
}