2012-08-15 20:46:55 -05:00
|
|
|
struct noncopyable {
|
2012-10-12 14:32:36 -05:00
|
|
|
i: (), drop { error!("dropped"); }
|
2012-08-02 18:00:45 -05:00
|
|
|
}
|
2012-09-05 17:58:43 -05:00
|
|
|
|
|
|
|
fn noncopyable() -> noncopyable {
|
|
|
|
noncopyable {
|
|
|
|
i: ()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-02 18:00:45 -05:00
|
|
|
enum wrapper = noncopyable;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x1 = wrapper(noncopyable());
|
|
|
|
let _x2 = move *x1; //~ ERROR moving out of enum content
|
2012-10-12 14:32:36 -05:00
|
|
|
}
|