]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/access-mode-in-closures.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / 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 }