2018-10-15 07:07:19 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
struct Value;
|
|
|
|
impl Value {
|
|
|
|
fn as_array(&self) -> Option<&Vec<Value>> {
|
|
|
|
None
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo(val: Value) {
|
|
|
|
let _reviewers_original: Vec<Value> = match val.as_array() {
|
|
|
|
Some(array) => {
|
2019-05-05 06:02:32 -05:00
|
|
|
*array //~ ERROR cannot move out of `*array`
|
2018-10-15 07:07:19 -05:00
|
|
|
}
|
|
|
|
None => vec![]
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|