blob: 396bfc1c9319945d55b9d7f9095fffaf1889131e [file] [log] [blame]
#![feature(nll)]
#![feature(bind_by_move_pattern_guards)]
struct A { a: Box<i32> }
fn foo(n: i32) {
let x = A { a: Box::new(n) };
let _y = match x {
A { a: v } if { drop(v); true } => v,
//~^ ERROR cannot move out of borrowed content
_ => Box::new(0),
};
}
fn main() {
foo(107);
}