rust/src/test/compile-fail/borrowck-unary-move-2.rs
Kevin Cantu 1bede1f5e0 Replace several common macros of the form #m[...] with m!(...)
This commit replaces nearly all remaining uses of #fmt, #debug, #error,
and #info, and fixes some error messages...
2012-10-12 14:14:48 -07:00

17 lines
279 B
Rust

struct noncopyable {
i: (), drop { error!("dropped"); }
}
fn noncopyable() -> noncopyable {
noncopyable {
i: ()
}
}
enum wrapper = noncopyable;
fn main() {
let x1 = wrapper(noncopyable());
let _x2 = move *x1; //~ ERROR moving out of enum content
}