]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/access-mode-in-closures.rs
Rollup merge of #102488 - compiler-errors:gat-compatibility, r=oli-obk
[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 }