]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/access-mode-in-closures.rs
Sync portable-simd to rust-lang/portable-simd@72df4c45056a8bc0d1b3f06fdc828722177f0763
[rust.git] / src / test / ui / borrowck / access-mode-in-closures.rs
1 struct S(Vec<isize>);
2
3 fn unpack<F>(_unpack: F) where F: FnOnce(&S) -> Vec<isize> {}
4
5 fn main() {
6     let _foo = unpack(|s| {
7         // Test that `s` is moved here.
8         match *s { S(v) => v } //~ ERROR cannot move out
9     });
10 }