rust/src/test/compile-fail/borrowck-issue-2657-2.rs

10 lines
158 B
Rust

fn main() {
let x = Some(~1);
match x {
Some(ref y) => {
let _b = move *y; //~ ERROR moving out of dereference of immutable & pointer
}
_ => {}
}
}