2018-12-16 21:21:47 -06:00
|
|
|
struct S(Vec<isize>);
|
2013-01-19 19:38:12 -06:00
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
fn unpack<F>(_unpack: F) where F: FnOnce(&S) -> Vec<isize> {}
|
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.
|
2018-12-16 21:21:47 -06:00
|
|
|
match *s { S(v) => v } //~ ERROR cannot move out
|
2013-01-10 08:29:26 -06:00
|
|
|
});
|
|
|
|
}
|