]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/access-mode-in-closures.rs
Merge commit '23d11428de3e973b34a5090a78d62887f821c90e' into clippyup
[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 }