2013-01-10 08:29:26 -06:00
|
|
|
enum sty = ~[int];
|
|
|
|
|
2013-01-10 15:57:38 -06:00
|
|
|
fn unpack(_unpack: &fn(v: &sty) -> ~[int]) {}
|
2013-01-10 08:29:26 -06:00
|
|
|
|
|
|
|
fn main() {
|
2013-01-10 15:57:38 -06:00
|
|
|
let _foo = unpack(|s| {
|
2013-01-10 08:29:26 -06:00
|
|
|
// Test that `s` is moved here.
|
|
|
|
match *s { sty(v) => v } //~ ERROR moving out of dereference of immutable & pointer
|
|
|
|
});
|
|
|
|
}
|