2012-09-07 16:50:47 -05:00
|
|
|
struct X { x: (), drop { error!("destructor runs"); } }
|
|
|
|
struct Y { y: Option<X> }
|
2012-08-22 18:02:08 -05:00
|
|
|
|
|
|
|
fn main() {
|
2012-08-20 14:23:37 -05:00
|
|
|
let x = Y { y: Some(X { x: () }) };
|
2012-08-22 18:02:08 -05:00
|
|
|
match x.y {
|
2012-08-20 14:23:37 -05:00
|
|
|
Some(move _z) => { }, //~ ERROR cannot bind by-move when matching an lvalue
|
|
|
|
None => fail
|
2012-08-22 18:02:08 -05:00
|
|
|
}
|
|
|
|
}
|