2018-12-16 22:21:47 -05:00
|
|
|
struct S(Vec<isize>);
|
2013-01-19 17:38:12 -08:00
|
|
|
|
2018-12-16 22:21:47 -05:00
|
|
|
fn unpack<F>(_unpack: F) where F: FnOnce(&S) -> Vec<isize> {}
|
2013-01-10 06:29:26 -08:00
|
|
|
|
|
|
|
fn main() {
|
2013-01-10 13:57:38 -08:00
|
|
|
let _foo = unpack(|s| {
|
2013-01-10 06:29:26 -08:00
|
|
|
// Test that `s` is moved here.
|
2018-12-16 22:21:47 -05:00
|
|
|
match *s { S(v) => v } //~ ERROR cannot move out
|
2013-01-10 06:29:26 -08:00
|
|
|
});
|
|
|
|
}
|