2015-02-19 17:54:41 +01:00
|
|
|
pub fn main() {
|
2021-08-25 02:39:40 +02:00
|
|
|
let x: Box<_> = Box::new(1);
|
2015-02-19 17:54:41 +01:00
|
|
|
|
|
|
|
|
let v = (1, 2);
|
|
|
|
|
|
|
|
|
|
match v {
|
|
|
|
|
(1, _) |
|
|
|
|
|
(_, 2) if take(x) => (), //~ ERROR use of moved value: `x`
|
|
|
|
|
_ => (),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn take<T>(_: T) -> bool { false }
|